FreeBSD Bugzilla – Attachment 102149 Details for
Bug 141852
sysutils/fuser allows user to send any signal to any
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.08 KB, created by
Denis Barov
on 2009-12-21 20:00:17 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Denis Barov
Created:
2009-12-21 20:00:17 UTC
Size:
1.08 KB
patch
obsolete
>diff -urN fuser/files/patch-fuser.c fuser/files/patch-fuser.c >--- fuser/files/patch-fuser.c.orig 1970-01-01 03:00:00.000000000 +0300 >+++ fuser/files/patch-fuser.c 2009-12-21 22:52:36.000000000 +0300 >@@ -0,0 +1,35 @@ >+--- fuser.c.orig 2006-03-14 14:07:08.000000000 +0300 >++++ fuser.c 2009-12-21 22:51:33.000000000 +0300 >+@@ -608,6 +608,7 @@ >+ char *ep; >+ char *kernimg = NULL; /* We are using curr. sys by default */ >+ char *mcore = NULL; >++ int retvalue = 0; >+ >+ while ((ch = getopt(argc, argv, "C:K:cfkms:u")) != -1) >+ switch(ch) { >+@@ -696,8 +697,13 @@ >+ if (ufl != 0) { >+ print_file_info(pinfo->pid, \ >+ pinfo->uid, ufl); >+- if ((flags & KFLAG) != 0) >+- (void)kill(pinfo->pid, sig); >++ if ((flags & KFLAG) != 0) { >++ if (geteuid() == getuid()) { >++ (void)kill(pinfo->pid, sig); >++ } else { >++ retvalue = 1; >++ } >++ } >+ } >+ } >+ (void)fprintf(stderr, "\n"); >+@@ -707,7 +713,7 @@ >+ SLIST_FREE(&prclist, next, pinfo_free); >+ (void)kvm_close(kd); >+ >+- return 0; >++ return retvalue; >+ >+ } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 141852
: 102149