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 | |
parent | 4233cfb1e92c2c436126bac2782b81e081286a02 (diff) |
Drop to the user's UID when reading user keys with -a.
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | ssh-vulnkey.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 609738ea1..01dcc41f4 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -54,6 +54,7 @@ openssh (1:4.7p1-11) UNRELEASED; urgency=low | |||
54 | - Fix some buffer handling inconsistencies. | 54 | - Fix some buffer handling inconsistencies. |
55 | - Use xasprintf to build user key file names, avoiding truncation | 55 | - Use xasprintf to build user key file names, avoiding truncation |
56 | problems. | 56 | problems. |
57 | - Drop to the user's UID when reading user keys with -a. | ||
57 | 58 | ||
58 | -- Colin Watson <cjwatson@debian.org> Sat, 17 May 2008 08:48:45 +0200 | 59 | -- Colin Watson <cjwatson@debian.org> Sat, 17 May 2008 08:48:45 +0200 |
59 | 60 | ||
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) { |