FreeBSD Bugzilla – Attachment 149333 Details for
Bug 194971
[patch] pw(8): wrong error message when using -V dir
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for pw.c
pw.diff (text/plain), 633 bytes, created by
Freddy DISSAUX
on 2014-11-12 20:18:39 UTC
(
hide
)
Description:
patch for pw.c
Filename:
MIME Type:
Creator:
Freddy DISSAUX
Created:
2014-11-12 20:18:39 UTC
Size:
633 bytes
patch
obsolete
>Index: pw.c >=================================================================== >--- pw.c (revision 274349) >+++ pw.c (working copy) >@@ -98,6 +98,7 @@ > int which = -1; > char *config = NULL; > struct userconf *cnf; >+ struct stat st; > > static const char *opts[W_NUM][M_NUM] = > { >@@ -143,6 +144,10 @@ > if (argv[1][1] == 'V') { > optarg = &argv[1][2]; > if (*optarg == '\0') { >+ if (stat(argv[2], &st) != 0) >+ errx(EX_OSFILE, "no such directory `%s'", argv[2]); >+ if (!S_ISDIR(st.st_mode)) >+ errx(EX_OSFILE, "`%s' not a directory", argv[2]); > optarg = argv[2]; > ++argv; > --argc;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 194971
: 149333 |
149334
|
149335