PERFORCE change 17628 for review
Adam Migus
amigus at freebsd.org
Tue Sep 17 20:59:20 GMT 2002
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17628
Change 17628 by amigus at amigus_caster on 2002/09/17 13:58:41
Forgot a pipe lock and userland bug fixes.
Affected files ...
.. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#266 edit
.. //depot/projects/trustedbsd/mac/usr.sbin/getfmac/getfmac.c#3 edit
.. //depot/projects/trustedbsd/mac/usr.sbin/getpmac/getpmac.c#3 edit
.. //depot/projects/trustedbsd/mac/usr.sbin/setfmac/setfmac.c#3 edit
Differences ...
==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#266 (text+ko) ====
@@ -3842,8 +3842,10 @@
mac_free_element_array(element_array);
if (error == 0) {
pipe = (struct pipe *)fp->f_data;
+ PIPE_LOCK(pipe);
error = mac_pipe_label_set(td->td_ucred, pipe,
&intlabel);
+ PIPE_UNLOCK(pipe);
}
mac_destroy_pipe_label(&intlabel);
==== //depot/projects/trustedbsd/mac/usr.sbin/getfmac/getfmac.c#3 (text+ko) ====
@@ -53,7 +53,7 @@
error = mac_get_file(argv[i], label);
if (error) {
- perror(argv[1]);
+ perror(argv[i]);
mac_free(label);
continue;
}
==== //depot/projects/trustedbsd/mac/usr.sbin/getpmac/getpmac.c#3 (text+ko) ====
@@ -64,12 +64,17 @@
return (-1);
}
- if (pid_set)
+ if (pid_set) {
error = mac_get_pid(pid, label);
- else
+ if (error)
+ perror("mac_get_pid");
+ }
+ else {
error = mac_get_proc(label);
+ if (error)
+ perror("mac_get_proc");
+ }
if (error) {
- perror("mac_get_proc");
mac_free(label);
exit (-1);
}
==== //depot/projects/trustedbsd/mac/usr.sbin/setfmac/setfmac.c#3 (text+ko) ====
@@ -37,7 +37,7 @@
for (i = 2; i < argc; i++) {
error = mac_set_file(argv[i], label);
if (error) {
- perror(argv[1]);
+ perror(argv[i]);
return (-1);
}
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