blob: cc992ab751d6fbcfcf365a4f31a748acd68a6a76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
grab fixes from upstream for relative AuthorizedKeysFile handling
https://bugs.gentoo.org/308939
Author: djm <djm>
Date: Sun Mar 21 18:53:04 2010 +0000
- markus@cvs.openbsd.org 2010/03/12 11:37:40
[servconf.c]
do not prepend AuthorizedKeysFile with getcwd(), unbreaks relative paths
Author: djm <djm>
Date: Sun Mar 21 18:52:26 2010 +0000
- djm@cvs.openbsd.org 2010/03/12 01:06:25
[servconf.c]
unbreak AuthorizedKeys option with a $HOME-relative path; reported by
vinschen AT redhat.com, ok dtucker@
Index: servconf.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/servconf.c,v
retrieving revision 1.204
retrieving revision 1.206
diff -N -u -p -r1.204 -r1.206
--- servconf.c 4 Mar 2010 10:36:03 -0000 1.204
+++ servconf.c 12 Mar 2010 11:37:40 -0000 1.206
@@ -1180,7 +1180,17 @@ process_server_config_line(ServerOptions *options, cha
charptr = (opcode == sAuthorizedKeysFile) ?
&options->authorized_keys_file :
&options->authorized_keys_file2;
- goto parse_filename;
+ arg = strdelim(&cp);
+ if (!arg || *arg == '\0')
+ fatal("%s line %d: missing file name.",
+ filename, linenum);
+ if (*activep && *charptr == NULL) {
+ *charptr = tilde_expand_filename(arg, getuid());
+ /* increase optional counter */
+ if (intptr != NULL)
+ *intptr = *intptr + 1;
+ }
+ break;
case sClientAliveInterval:
intptr = &options->client_alive_interval;
|