diff options
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); |