diff options
author | Colin Watson <cjwatson@debian.org> | 2008-05-26 09:48:06 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2008-05-26 09:48:06 +0000 |
commit | 7487a077a410826fa48f6a1db33408831b48dd21 (patch) | |
tree | c5d31579c915770b43412085c42b8bfeed0e5f98 /ssh-vulnkey.c | |
parent | 4233cfb1e92c2c436126bac2782b81e081286a02 (diff) |
Drop to the user's UID when reading user keys with -a.
Diffstat (limited to 'ssh-vulnkey.c')
-rw-r--r-- | ssh-vulnkey.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ssh-vulnkey.c b/ssh-vulnkey.c index 8e1f11f79..52667199c 100644 --- a/ssh-vulnkey.c +++ b/ssh-vulnkey.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include "key.h" | 41 | #include "key.h" |
42 | #include "authfile.h" | 42 | #include "authfile.h" |
43 | #include "pathnames.h" | 43 | #include "pathnames.h" |
44 | #include "uidswap.h" | ||
44 | #include "misc.h" | 45 | #include "misc.h" |
45 | 46 | ||
46 | extern char *__progname; | 47 | extern char *__progname; |
@@ -330,8 +331,10 @@ main(int argc, char **argv) | |||
330 | 331 | ||
331 | while ((pw = getpwent()) != NULL) { | 332 | while ((pw = getpwent()) != NULL) { |
332 | if (pw->pw_dir) { | 333 | if (pw->pw_dir) { |
334 | temporarily_use_uid(pw); | ||
333 | if (!do_user(pw->pw_dir)) | 335 | if (!do_user(pw->pw_dir)) |
334 | ret = 0; | 336 | ret = 0; |
337 | restore_uid(); | ||
335 | } | 338 | } |
336 | } | 339 | } |
337 | } else if (optind == argc) { | 340 | } else if (optind == argc) { |