Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 87472 Details for
Bug 134194
sys-process/vixie-cron: check return code of setuid()
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
do_command.c.patch
vc.diff (text/plain), 835 bytes, created by
Eugene Ilkov
on 2006-05-25 05:56:17 UTC
(
hide
)
Description:
do_command.c.patch
Filename:
MIME Type:
Creator:
Eugene Ilkov
Created:
2006-05-25 05:56:17 UTC
Size:
835 bytes
patch
obsolete
>diff -uPr vixie-cron-4.1/do_command.c vixie-cron-4.1.lk/do_command.c >--- vixie-cron-4.1/do_command.c 2006-05-25 16:44:26.000000000 +0400 >+++ vixie-cron-4.1.lk/do_command.c 2006-05-25 16:42:25.000000000 +0400 >@@ -240,12 +240,23 @@ > } > } > #else >- setgid(e->pwd->pw_gid); >+ > initgroups(usernm, e->pwd->pw_gid); > #if (defined(BSD)) && (BSD >= 199103) > setlogin(usernm); > #endif /* BSD */ >- setuid(e->pwd->pw_uid); /* we aren't root after this... */ >+ // setuid(e->pwd->pw_uid); /* we aren't root after this... */ >+ >+ if ( setgid(e->pwd->pw_gid) == -1 ) { >+ fprintf(stderr,"can't set gid for %s\n", e->pwd->pw_name); >+ _exit(1); >+ } >+ >+ if ( setuid(e->pwd->pw_uid) == -1 ) { >+ fprintf(stderr,"can't set uid for %s\n", e->pwd->pw_name); >+ _exit(1); >+ } >+ > > #endif /* LOGIN_CAP */ > chdir(env_get("HOME", e->envp));
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 134194
: 87472