diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-03-30 05:45:40 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-03-30 05:45:40 +0800 |
commit | 76746edd9196c752cf198765e1921f55978276e3 (patch) | |
tree | e18824cc19559193a34942f82c3d39350f7c02f0 | |
parent | 9d8cb6cc4563c4c9a7f571b29725670cbebb8d32 (diff) | |
download | pttbbs-76746edd9196c752cf198765e1921f55978276e3.tar pttbbs-76746edd9196c752cf198765e1921f55978276e3.tar.gz pttbbs-76746edd9196c752cf198765e1921f55978276e3.tar.bz2 pttbbs-76746edd9196c752cf198765e1921f55978276e3.tar.lz pttbbs-76746edd9196c752cf198765e1921f55978276e3.tar.xz pttbbs-76746edd9196c752cf198765e1921f55978276e3.tar.zst pttbbs-76746edd9196c752cf198765e1921f55978276e3.zip |
:p again passwd debug
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1630 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/passwd.c | 4 |
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); |