]> andersk Git - moira.git/blobdiff - afssync/prnewuser.c
sync'ing files for RCS->CVS migration
[moira.git] / afssync / prnewuser.c
diff --git a/afssync/prnewuser.c b/afssync/prnewuser.c
deleted file mode 100644 (file)
index 34c917e..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/* $Header$ */
-
-#include <stdio.h>
-#include <sys/file.h>
-#include <rx/xdr.h>
-#include "print.h"
-#include "prserver.h"
-#include "prerror.h"
-
-int dbase_fd;
-extern struct prheader cheader;
-
-main(argc, argv)
-int argc;
-char **argv;
-{
-    char *name, *msg;
-    long id, status;
-
-    if (argc != 3) {
-       fprintf(stderr, "usage: %s loginname uid\n", argv[0]);
-       exit(1);
-    }
-    name = argv[1];
-    id = atoi(argv[2]);
-
-    dbase_fd = open("/usr/afs/db/xprdb.DB0", O_RDWR|O_CREAT, 0660);
-
-    status = PR_INewEntry(NULL, name, id, 0);
-    if (status != 0) {
-       switch (status) {
-       case PREXIST:
-           msg = "name already exists";
-           break;
-       case PRIDEXIST:
-           msg = "ID already exists";
-           break;
-       case PRNOIDS:
-           msg = "no IDs available";
-           break;
-       case PRDBFAIL:
-           msg = "database failed";
-           break;
-       case PRNOENT:
-           msg = "no space left in database";
-           break;
-       case PRPERM:
-           msg = "permission denied";
-           break;
-       case PRNOTGROUP:
-           msg = "not a group";
-           break;
-       case PRNOTUSER:
-           msg = "not a user";
-           break;
-       case PRBADNAM:
-           msg = "bad name";
-           break;
-       default:
-           msg = "unknown code";
-           break;
-       }
-       fprintf(stderr, "Failed: %s (%d)\n", msg, status);
-    }
-    exit(status);
-}
This page took 0.054452 seconds and 4 git commands to generate.