summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-30 04:15:39 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-30 04:15:39 +0800
commit276338a1b2991abcbedf5dffc743e3e5b498f762 (patch)
tree236ad684836ca3ecf355c1c9be00a4190dc790f3 /mbbsd
parent95f0b420db24db279e1fb25b26973acf229e53e8 (diff)
downloadpttbbs-276338a1b2991abcbedf5dffc743e3e5b498f762.tar
pttbbs-276338a1b2991abcbedf5dffc743e3e5b498f762.tar.gz
pttbbs-276338a1b2991abcbedf5dffc743e3e5b498f762.tar.bz2
pttbbs-276338a1b2991abcbedf5dffc743e3e5b498f762.tar.lz
pttbbs-276338a1b2991abcbedf5dffc743e3e5b498f762.tar.xz
pttbbs-276338a1b2991abcbedf5dffc743e3e5b498f762.tar.zst
pttbbs-276338a1b2991abcbedf5dffc743e3e5b498f762.zip
debug ..:p
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1628 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/passwd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/passwd.c b/mbbsd/passwd.c
index 67012f99..3bb26273 100644
--- a/mbbsd/passwd.c
+++ b/mbbsd/passwd.c
@@ -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_RDWR)) < 0)
+ if ((pwdfd = open(path, O_WRONLY | O_CREAT)) < 0)
exit(1);
write(pwdfd, buf, sizeof(userec_t));
close(pwdfd);