From ad5ff67a84d3f377d5b6213ca1fa33702098fb49 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 8 Nov 2026 02:38:39 -0600 Subject: [PATCH] Rithin krishna noticed that the SUID user/nouser options never worked because the strcmp tests are backwards. (This is why I'm working to get scripts/test.sh to run under mkroot, all the runs-as-root changes-your-system stuff needs proper and thorough regression tests, which are awkward to do on a development system you care about.) --- toys/lsb/umount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toys/lsb/umount.c b/toys/lsb/umount.c index 464b02b5..8d5365ed 100644 --- a/toys/lsb/umount.c +++ b/toys/lsb/umount.c @@ -60,8 +60,8 @@ static void do_umount(char *dir, char *dev, int flags) char *s; if (!strcmp(mt->dir, dir)) while ((s = comma_iterate(&mt->opts, &len))) { - if (len == 4 && strncmp(s, "user", 4)) user = 1; - else if (len == 6 && strncmp(s, "nouser", 6)) user = 0; + if (len == 4 && !strncmp(s, "user", 4)) user = 1; + else if (len == 6 && !strncmp(s, "nouser", 6)) user = 0; } mt = mt->next; -- 2.39.5