diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-11-14 11:22:34 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-11-14 11:22:34 +0800 |
commit | 1f523eb40440e382d939ae44c4aaacaa15ed62f3 (patch) | |
tree | c6b862801a0c8d3ce5d3c07c1bafcd3de31b0362 /util | |
parent | 505cb0c31b99c3e893262d5babe6755bb4bfd9ee (diff) | |
download | pttbbs-1f523eb40440e382d939ae44c4aaacaa15ed62f3.tar pttbbs-1f523eb40440e382d939ae44c4aaacaa15ed62f3.tar.gz pttbbs-1f523eb40440e382d939ae44c4aaacaa15ed62f3.tar.bz2 pttbbs-1f523eb40440e382d939ae44c4aaacaa15ed62f3.tar.lz pttbbs-1f523eb40440e382d939ae44c4aaacaa15ed62f3.tar.xz pttbbs-1f523eb40440e382d939ae44c4aaacaa15ed62f3.tar.zst pttbbs-1f523eb40440e382d939ae44c4aaacaa15ed62f3.zip |
1. fix invalid operation
2. setuid first in util/cleanpasswd.c
3. add "people/per option" in the result of a vote
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1329 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r-- | util/cleanpasswd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/cleanpasswd.c b/util/cleanpasswd.c index c5f8a251..60ae650d 100644 --- a/util/cleanpasswd.c +++ b/util/cleanpasswd.c @@ -18,6 +18,10 @@ int main(int argc, char *argv[]) int i, fd, fdw; userec_t user; + setgid(BBSGID); + setuid(BBSUID); + chdir(BBSHOME); + if ((fd = open(BBSHOME"/.PASSWDS", O_RDONLY)) < 0){ perror("open .PASSWDS error"); exit(-1); |