summaryrefslogtreecommitdiffstats
path: root/util/splitpasswd.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-11-09 05:16:25 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-11-09 05:16:25 +0800
commit5b17379b7b9e93482ce886ee75eae41b2e5a9bb6 (patch)
tree87fba80f039bea2f23dd299780b9e3b33f305f47 /util/splitpasswd.c
parent10624ecf13fd3d2537619cb895334257882e06ae (diff)
downloadpttbbs-5b17379b7b9e93482ce886ee75eae41b2e5a9bb6.tar
pttbbs-5b17379b7b9e93482ce886ee75eae41b2e5a9bb6.tar.gz
pttbbs-5b17379b7b9e93482ce886ee75eae41b2e5a9bb6.tar.bz2
pttbbs-5b17379b7b9e93482ce886ee75eae41b2e5a9bb6.tar.lz
pttbbs-5b17379b7b9e93482ce886ee75eae41b2e5a9bb6.tar.xz
pttbbs-5b17379b7b9e93482ce886ee75eae41b2e5a9bb6.tar.zst
pttbbs-5b17379b7b9e93482ce886ee75eae41b2e5a9bb6.zip
remove mdclean, splitpasswd
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@567 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util/splitpasswd.c')
-rw-r--r--util/splitpasswd.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/util/splitpasswd.c b/util/splitpasswd.c
deleted file mode 100644
index 1a800f6c..00000000
--- a/util/splitpasswd.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "bbs.h"
-#include <err.h>
-
-int main(int argc, char **argv)
-{
- userec_t xuser;
- int fd, ufd;
- char path[80], fn[80];
-
- chdir(BBSHOME);
- if( (fd = open(".PASSWDS", O_RDONLY)) < 0 )
- err(1, ".PASSWDS");
-
- while( read(fd, &xuser, sizeof(xuser)) > 0 ){
- if( strcmp(xuser.userid, "in2") != 0 )
- continue;
- sprintf(path, "home/%c/%s", xuser.userid[0], xuser.userid);
- if( access(path, 0) < 0 ){
- printf("user home error (%s) (%s)\n", xuser.userid, path);
- continue;
- }
- sprintf(fn, "%s/.passwd", path);
- if( (ufd = open(fn, O_WRONLY | O_CREAT, 0600)) < 0 ){
- perror(path);
- continue;
- }
- write(ufd, &xuser, sizeof(xuser));
- close(ufd);
- }
-
- return 0;
-}