View | Details | Raw Unified | Return to bug 1290 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile.inc (-3 / +3 lines)
Lines 3-9 Link Here
3
CFLAGS+=	-I${.CURDIR}/..
3
CFLAGS+=	-I${.CURDIR}/..
4
4
5
CDIAGFLAGS=	-Wall
5
CDIAGFLAGS=	-Wall
6
#CDIAGFLAGS+=	-Werror
6
CDIAGFLAGS+=	-Werror
7
CDIAGFLAGS+=	-Wpointer-arith
7
CDIAGFLAGS+=	-Wpointer-arith
8
CDIAGFLAGS+=	-Wno-uninitialized
8
CDIAGFLAGS+=	-Wno-uninitialized
9
CDIAGFLAGS+=	-Wstrict-prototypes
9
CDIAGFLAGS+=	-Wstrict-prototypes
Lines 13-21 CDIAGFLAGS+= -Wsign-compare Link Here
13
CDIAGFLAGS+=	-Wbounded
13
CDIAGFLAGS+=	-Wbounded
14
CDIAGFLAGS+=	-Wshadow
14
CDIAGFLAGS+=	-Wshadow
15
15
16
#DEBUG=-g
16
DEBUG=-g
17
17
18
#CFLAGS+=	-DJPAKE
18
CFLAGS+=	-DJPAKE
19
19
20
#CFLAGS+=	-DSMARTCARD
20
#CFLAGS+=	-DSMARTCARD
21
#LDADD+=	-lsectok
21
#LDADD+=	-lsectok
(-)servconf.c (-1 / +19 lines)
Lines 422-427 parse_token(const char *cp, const char * Link Here
422
	return sBadOption;
422
	return sBadOption;
423
}
423
}
424
424
425
char *
426
derelativise_path(const char *path)
427
{
428
	char *expanded, *ret, *cwd;
429
430
	debug3("XXX: %s", path);
431
	expanded = tilde_expand_filename(path, getuid());
432
	if (*expanded == '/')
433
		return expanded;
434
	if ((cwd = getcwd(NULL, 0)) == NULL)
435
		fatal("%s: getcwd: %s", __func__, strerror(errno));
436
	xasprintf(&ret, "%s/%s", cwd, expanded);
437
	xfree(cwd);
438
	xfree(expanded);
439
	debug3("XXX: %s", ret);
440
	return ret;
441
}
442
425
static void
443
static void
426
add_listen_addr(ServerOptions *options, char *addr, int port)
444
add_listen_addr(ServerOptions *options, char *addr, int port)
427
{
445
{
Lines 750-756 process_server_config_line(ServerOptions Link Here
750
			fatal("%s line %d: missing file name.",
768
			fatal("%s line %d: missing file name.",
751
			    filename, linenum);
769
			    filename, linenum);
752
		if (*activep && *charptr == NULL) {
770
		if (*activep && *charptr == NULL) {
753
			*charptr = tilde_expand_filename(arg, getuid());
771
			*charptr = derelativise_path(arg);
754
			/* increase optional counter */
772
			/* increase optional counter */
755
			if (intptr != NULL)
773
			if (intptr != NULL)
756
				*intptr = *intptr + 1;
774
				*intptr = *intptr + 1;
(-)servconf.h (+1 lines)
Lines 162-166 void parse_server_match_config(ServerOp Link Here
162
	     const char *);
162
	     const char *);
163
void	 copy_set_server_options(ServerOptions *, ServerOptions *, int);
163
void	 copy_set_server_options(ServerOptions *, ServerOptions *, int);
164
void	 dump_config(ServerOptions *);
164
void	 dump_config(ServerOptions *);
165
char	*derelativise_path(const char *);
165
166
166
#endif				/* SERVCONF_H */
167
#endif				/* SERVCONF_H */
(-)sshd.c (-1 / +2 lines)
Lines 1297-1303 main(int ac, char **av) Link Here
1297
				fprintf(stderr, "too many host keys.\n");
1297
				fprintf(stderr, "too many host keys.\n");
1298
				exit(1);
1298
				exit(1);
1299
			}
1299
			}
1300
			options.host_key_files[options.num_host_key_files++] = optarg;
1300
			options.host_key_files[options.num_host_key_files++] = 
1301
			   derelativise_path(optarg);
1301
			break;
1302
			break;
1302
		case 't':
1303
		case 't':
1303
			test_flag = 1;
1304
			test_flag = 1;

Return to bug 1290