Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177076187
D17566.1793788381.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D17566.1793788381.diff
View Options
Index: head/usr.sbin/pw/pw.h
===================================================================
--- head/usr.sbin/pw/pw.h
+++ head/usr.sbin/pw/pw.h
@@ -64,6 +64,7 @@
};
#define _DEF_DIRMODE (S_IRWXU | S_IRWXG | S_IRWXO)
+#define _PW_CONF "pw.conf"
#define _PATH_PW_CONF "/etc/pw.conf"
#define _UC_MAXLINE 1024
#define _UC_MAXSHELLS 32
Index: head/usr.sbin/pw/pw_conf.c
===================================================================
--- head/usr.sbin/pw/pw_conf.c
+++ head/usr.sbin/pw/pw_conf.c
@@ -417,9 +417,13 @@
int i, j;
struct sbuf *buf;
FILE *fp;
+ char cfgfile[MAXPATHLEN];
- if (file == NULL)
- file = _PATH_PW_CONF;
+ if (file == NULL) {
+ snprintf(cfgfile, sizeof(cfgfile), "%s/" _PW_CONF,
+ conf.etcpath);
+ file = cfgfile;
+ }
if ((fd = open(file, O_CREAT|O_RDWR|O_TRUNC|O_EXLOCK, 0644)) == -1)
return (0);
Index: head/usr.sbin/pw/pw_utils.c
===================================================================
--- head/usr.sbin/pw/pw_utils.c
+++ head/usr.sbin/pw/pw_utils.c
@@ -71,7 +71,7 @@
if (config != NULL)
return (read_userconfig(config));
- snprintf(defaultcfg, sizeof(defaultcfg), "%s/pw.conf", conf.etcpath);
+ snprintf(defaultcfg, sizeof(defaultcfg), "%s/" _PW_CONF, conf.etcpath);
return (read_userconfig(defaultcfg));
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 4, 10:33 AM (2 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41423003
Default Alt Text
D17566.1793788381.diff (1 KB)
Attached To
Mode
D17566: PR231653: pw doesn't respect -V when writing pw.conf
Attached
Detach File
Event Timeline