summaryrefslogtreecommitdiff
path: root/src/chsh.c
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2016-11-30 02:36:06 +0100
committerBalint Reczey <balint@balintreczey.hu>2016-11-30 02:36:06 +0100
commit365658d0f3a51814626afbb70aa2dd7b5e82ac36 (patch)
tree7218fb9147359258fda0f9a43da5a29b2d20e85b /src/chsh.c
parentbfaa59229d61adb7fa0c570f0d94fd324c6e05aa (diff)
downloadshadow-365658d0f3a51814626afbb70aa2dd7b5e82ac36.tar.gz
Imported Upstream version 4.4upstream/4.4
Diffstat (limited to 'src/chsh.c')
-rw-r--r--src/chsh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chsh.c b/src/chsh.c
index 393a79ff..c89708b9 100644
--- a/src/chsh.c
+++ b/src/chsh.c
@@ -373,7 +373,7 @@ static void update_shell (const char *user, char *newshell)
fail_exit (1);
}
pw_locked = true;
- if (pw_open (O_RDWR) == 0) {
+ if (pw_open (O_CREAT | O_RDWR) == 0) {
fprintf (stderr, _("%s: cannot open %s\n"), Prog, pw_dbname ());
SYSLOG ((LOG_WARN, "cannot open %s", pw_dbname ()));
fail_exit (1);