Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 64785 Details for
Bug 100886
net-mail/cmd5checkpw-0.30 kinda version bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
euid_030.diff
euid_030.diff (text/plain), 1.08 KB, created by
petre rodan (RETIRED)
on 2005-07-31 05:48:08 UTC
(
hide
)
Description:
euid_030.diff
Filename:
MIME Type:
Creator:
petre rodan (RETIRED)
Created:
2005-07-31 05:48:08 UTC
Size:
1.08 KB
patch
obsolete
>diff -upr cmd5checkpw-0.30.orig/main.c cmd5checkpw-0.30/main.c >--- cmd5checkpw-0.30.orig/main.c 2003-09-18 16:34:01.000000000 +0300 >+++ cmd5checkpw-0.30/main.c 2005-07-31 13:19:25.000000000 +0300 >@@ -5,6 +5,7 @@ > #include <pwd.h> > #include <stdio.h> > #include <unistd.h> >+#include <sys/types.h> > > #define LINE_MAX 256 > #define SASLUSERFILE "/var/qmail/users/authuser" >@@ -23,10 +24,26 @@ int doit(unsigned char *testlogin, unsig > unsigned char h; > FILE *fp; > int j; >- >+ uid_t uid; >+ gid_t gid; > char *linepnt; > > if ((fp = fopen(SASLUSERFILE, READONLY)) == NULL) _exit(2); >+ >+ uid = getuid(); >+ gid = getgid(); >+ >+ if (gid != getegid()) { >+ if (setegid(gid)) >+ _exit(2); >+ } >+ >+ >+ if (uid && (uid != geteuid())) { >+ if (seteuid(uid)) >+ _exit(2); >+ } >+ > while (fgets(line, LINE_MAX, fp) != NULL) { > if ((linepnt = strchr(line, '\n')) != NULL) { > *linepnt = 0; >@@ -39,7 +56,8 @@ int doit(unsigned char *testlogin, unsig > break; > } > } >- fclose(fp); >+ >+ if (EOF == fclose(fp)) _exit(2); > > if (!found_user) return(1); >
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 100886
:
64784
| 64785 |
64786