summaryrefslogtreecommitdiffstats
path: root/mbbsd/passwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/passwd.c')
-rw-r--r--mbbsd/passwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/passwd.c b/mbbsd/passwd.c
index 7cf4e110..5cafc88e 100644
--- a/mbbsd/passwd.c
+++ b/mbbsd/passwd.c
@@ -60,7 +60,7 @@ passwd_update_money(int num) /* update money only */
sethomefile(path, getuserid(num), ".passwd");
- if ((pwdfd = open(path, O_WRONLY, 0600)) < 0)
+ if ((pwdfd = open(path, O_WRONLY)) < 0)
{
if(passwd_index_query(num, &user)<0) // tempory code, will be removed
exit(1);
@@ -99,7 +99,7 @@ passwd_update(int num, userec_t * buf)
sethomefile(path, getuserid(num), ".passwd");
buf->money = moneyof(num);
- if ((pwdfd = open(path, O_WRONLY, 0600)) < 0)
+ if ((pwdfd = open(path, O_WRONLY|O_CREAT, 0600)) < 0)
exit(1);
write(pwdfd, buf, sizeof(userec_t));
close(pwdfd);