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

Collapse All | Expand All

(-)pw.c (+5 lines)
Lines 98-103 Link Here
98
	int             which = -1;
98
	int             which = -1;
99
	char		*config = NULL;
99
	char		*config = NULL;
100
	struct userconf *cnf;
100
	struct userconf *cnf;
101
	struct stat	st;
101
102
102
	static const char *opts[W_NUM][M_NUM] =
103
	static const char *opts[W_NUM][M_NUM] =
103
	{
104
	{
Lines 143-148 Link Here
143
			if (argv[1][1] == 'V') {
144
			if (argv[1][1] == 'V') {
144
				optarg = &argv[1][2];
145
				optarg = &argv[1][2];
145
				if (*optarg == '\0') {
146
				if (*optarg == '\0') {
147
					if (stat(argv[2], &st) != 0)
148
						errx(EX_OSFILE, "no such directory `%s'", argv[2]);
149
					if (!S_ISDIR(st.st_mode))
150
						errx(EX_OSFILE, "`%s' not a directory", argv[2]);
146
					optarg = argv[2];
151
					optarg = argv[2];
147
					++argv;
152
					++argv;
148
					--argc;
153
					--argc;

Return to bug 194971