diff options
Diffstat (limited to 'source3/utils/smbpasswd.c')
-rw-r--r-- | source3/utils/smbpasswd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index 598944baa5..7ab8d8a0db 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -400,7 +400,7 @@ static void usage(char *name) chmod(pfile, 0600); /* Lock the smbpasswd file for write. */ - if ((lockfd = pw_file_lock(pfile, F_WRLCK, 5)) < 0) { + if ((lockfd = pw_file_lock(fileno(fp), F_WRLCK, 5)) < 0) { err = errno; fprintf(stderr, "%s: Failed to lock password file %s.\n", argv[0], pfile); |