diff options
author | Yuri Pankov <yuripv@FreeBSD.org> | 2018-10-16 16:00:41 +0000 |
---|---|---|
committer | Yuri Pankov <yuripv@FreeBSD.org> | 2018-10-16 16:00:41 +0000 |
commit | 4835c3b1df5ea124ae8423ae742e8fb43bcdba77 (patch) | |
tree | 5e0fdfe009290faee83843e580770c2e4d8fb23c /usr.sbin/pw | |
parent | 47f1ea5109956d00c4b39afe3132af110f82292c (diff) |
Notes
Diffstat (limited to 'usr.sbin/pw')
-rw-r--r-- | usr.sbin/pw/pw.c | 3 | ||||
-rw-r--r-- | usr.sbin/pw/pw.h | 1 | ||||
-rw-r--r-- | usr.sbin/pw/pw_conf.c | 3 |
3 files changed, 2 insertions, 5 deletions
diff --git a/usr.sbin/pw/pw.c b/usr.sbin/pw/pw.c index 5f02a1513651f..4f92034a5d208 100644 --- a/usr.sbin/pw/pw.c +++ b/usr.sbin/pw/pw.c @@ -162,7 +162,8 @@ main(int argc, char *argv[]) PWF._altdir = PWF_ROOTDIR; } snprintf(conf.etcpath, sizeof(conf.etcpath), - "%s%s", optarg, arg == 'R' ? "/etc" : ""); + "%s%s", optarg, arg == 'R' ? + _PATH_PWD : ""); } else break; } diff --git a/usr.sbin/pw/pw.h b/usr.sbin/pw/pw.h index d5e2c600079f1..1e09722a907c7 100644 --- a/usr.sbin/pw/pw.h +++ b/usr.sbin/pw/pw.h @@ -65,7 +65,6 @@ enum _which #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 diff --git a/usr.sbin/pw/pw_conf.c b/usr.sbin/pw/pw_conf.c index f7b98f188f776..9dff3fe03efaf 100644 --- a/usr.sbin/pw/pw_conf.c +++ b/usr.sbin/pw/pw_conf.c @@ -255,9 +255,6 @@ read_userconfig(char const * file) buf = NULL; linecap = 0; - if (file == NULL) - file = _PATH_PW_CONF; - if ((fp = fopen(file, "r")) == NULL) return (&config); |