FreeBSD Bugzilla – Attachment 11243 Details for
Bug 22212
skeyaccess(3) doesn't for primary group
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.64 KB, created by
clefevre
on 2000-10-22 16:00:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
clefevre
Created:
2000-10-22 16:00:00 UTC
Size:
1.64 KB
patch
obsolete
>Index: skeyaccess.c >=================================================================== >RCS file: /home/ncvs/src/lib/libskey/skeyaccess.c,v >retrieving revision 1.9 >diff -u -r1.9 skeyaccess.c >--- skeyaccess.c 1998/10/26 11:54:36 1.9 >+++ skeyaccess.c 2000/10/22 13:55:38 >@@ -32,6 +32,7 @@ > #include <arpa/inet.h> > #include <stdio.h> > #include <grp.h> >+#include <pwd.h> > #include <ctype.h> > #include <syslog.h> > #include <unistd.h> >@@ -152,7 +153,7 @@ > int i; > > for (i = 0; login_info.internet_addr[i].s_addr; i++) >- printf("%s%s", login_info.internet_addr[i].s_addr == -1 ? >+ printf("%s%s", login_info.internet_addr[i].s_addr == INADDR_NONE ? > "(see error log)" : inet_ntoa(login_info.internet_addr[i]), > login_info.internet_addr[i + 1].s_addr ? " " : "\n"); > } >@@ -261,11 +262,15 @@ > static int match_group(login_info) > struct login_info *login_info; > { >+ struct passwd *passwd; > struct group *group; > char *tok; > char **memp; > >- if ((tok = need_token()) && (group = getgrnam(tok))) { >+ if ((tok = need_token()) && >+ (passwd = getpwnam(login_info->user)) && (group = getgrnam(tok))) { >+ if (passwd->pw_gid == group->gr_gid) >+ return (1); > for (memp = group->gr_mem; *memp; memp++) > if (strcmp(login_info->user, *memp) == 0) > return (1); >@@ -454,6 +459,7 @@ > > #ifdef TEST > >+int > main(argc, argv) > int argc; > char **argv; >@@ -469,7 +475,7 @@ > exit(0); > } > if (_PATH_SKEYACCESS[0] != '/') >- printf("Warning: this program uses control file: %s\n", KEYACCESS); >+ printf("Warning: this program uses control file: %s\n", _PATH_SKEYACCESS); > openlog("login", LOG_PID, LOG_AUTH); > > user = argv[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 22212
: 11243