Bugzilla – Attachment 3158 Details for
Bug 2873
AuthorizedKeysCommand with different user prevents fetching authorized keys from file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
make sure the cached group information belongs to the current UID
file_2873.txt (text/plain), 1.01 KB, created by
Jakub Jelen
on 2018-05-31 00:24:45 AEST
(
hide
)
Description:
make sure the cached group information belongs to the current UID
Filename:
MIME Type:
Creator:
Jakub Jelen
Created:
2018-05-31 00:24:45 AEST
Size:
1.01 KB
patch
obsolete
>diff --git a/uidswap.c b/uidswap.c >index 8bf6b244..179fbcce 100644 >--- a/uidswap.c >+++ b/uidswap.c >@@ -51,6 +51,7 @@ static int privileged = 0; > static int temporarily_use_uid_effective = 0; > static gid_t *saved_egroups = NULL, *user_groups = NULL; > static int saved_egroupslen = -1, user_groupslen = -1; >+static int user_groups_uid = -1; > > /* > * Temporarily changes to the given uid. If the effective user >@@ -95,7 +96,7 @@ temporarily_use_uid(struct passwd *pw) > } > > /* set and save the user's groups */ >- if (user_groupslen == -1) { >+ if (user_groupslen == -1 || user_groups_uid != pw->pw_uid) { > if (initgroups(pw->pw_name, pw->pw_gid) < 0) > fatal("initgroups: %s: %.100s", pw->pw_name, > strerror(errno)); >@@ -111,6 +112,7 @@ temporarily_use_uid(struct passwd *pw) > } else { /* user_groupslen == 0 */ > free(user_groups); > } >+ user_groups_uid = pw->pw_uid; > } > /* Set the effective uid to the given (unprivileged) uid. */ > if (setgroups(user_groupslen, user_groups) < 0)
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 Raw
Actions:
View
Attachments on
bug 2873
: 3158