Date: Tue, 24 Sep 2002 20:53:13 -0700 (PDT) From: Adam Migus <amigus@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 18114 for review Message-ID: <200209250353.g8P3rD3F056178@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18114 Change 18114 by amigus@amigus_ganymede on 2002/09/24 20:52:43 Tweak. Affected files ... .. //depot/projects/trustedbsd/misc/scripts/relabeluser#2 edit Differences ... ==== //depot/projects/trustedbsd/misc/scripts/relabeluser#2 (text+ko) ==== @@ -7,20 +7,27 @@ print "usage: $program <username> <label> <run-label>\n" and exit (1) if ($#ARGV != 2); +$user = $ARGV[0]; +$label = $ARGV[1]; +$run_label = $ARGV[2]; + +$dir = (getpwnam($user))[7]; + ($slabel) = ($label =~ /^(\S+\/\S+)\(.*\)$/); $command .= "/usr/local/sbin/mac_user_label.pl "; $command .= "--login-config-file /etc/login.conf "; $command .= "--user $user "; -$command .= "--label $label "; -$command .= "--tty-label $slabel"; +$command .= "--label \"$label\" "; +$command .= "--tty-label \"$slabel\""; $ret = system($command); die "$program: failed to execute \'$command\': $!" if ($ret); +$command = ""; $command .= "/usr/local/sbin/mac_user_label.pl "; -$command .= "--file-label $slabel "; -$command .= "--run-label $run_label "; +$command .= "--file-label \"$slabel\" "; +$command .= "--run-label \"$run_label\" "; $command .= "--directory $dir"; $ret = system($command); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209250353.g8P3rD3F056178>