PERFORCE change 18114 for review
Adam Migus
amigus at freebsd.org
Wed Sep 25 03:53:13 GMT 2002
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18114
Change 18114 by amigus at 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 at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list