su -m only works on Solaris 11 and up
authorJamie Cameron <jcameron@webmin.com>
Tue, 16 Jun 2009 05:03:26 +0000 (05:03 +0000)
committerJamie Cameron <jcameron@webmin.com>
Tue, 16 Jun 2009 05:03:26 +0000 (05:03 +0000)
web-lib-funcs.pl

index 31a4039..909ba0d 100755 (executable)
@@ -8179,7 +8179,8 @@ if ($uinfo[8] ne "/bin/sh" && $uinfo[8] !~ /\/bash$/) {
                $shellarg = " -s /bin/sh";
                }
        elsif ($gconfig{'os_type'} eq 'freebsd' ||
-              $gconfig{'os_type'} eq 'solaris' ||
+              $gconfig{'os_type'} eq 'solaris' &&
+               $gconfig{'os_version'} >= 11 ||
               $gconfig{'os_type'} eq 'macos') {
                # Use -m and force /bin/sh
                @args = ( "/bin/sh", "-c", quotemeta(join(" ", @args)) );