]> andersk Git - moira.git/commitdiff
Imakefile: use the same debug flag as everyone else
authordanw <danw>
Mon, 14 Jul 1997 20:21:56 +0000 (20:21 +0000)
committerdanw <danw>
Mon, 14 Jul 1997 20:21:56 +0000 (20:21 +0000)
afs.c: don't log an error when you try to create a user/group and find
   there's already a user/group with the same name and id. (Do still
   flame if only one of them matches.)
afs_rename.pl: don't log an error when trying to restore Xuser.foo if
   it doesn't exist, but user.foo does and is mounted in the right place

incremental/Imakefile
incremental/afs.c
incremental/afs_rename.pl

index f026a728ce91ed374b6a60facb921b9e10675183..2f6028367dab78b62674a414a29b3839a8621b3c 100644 (file)
@@ -9,8 +9,7 @@ AFSLIBS=$(AFSDIR)/lib/afs/libprot.a    $(AFSDIR)/lib/afs/libauth.a \
 
 SRCS = afs.c ksrvtgt.c
 CODE = $(SRCS)
-DEBUG = -O
-CFLAGS = -I../include -I../lib -I$(AFSDIR)/include -I/usr/athena/include $(DEBUG)
+CFLAGS = -I../include -I../lib -I$(AFSDIR)/include -I/usr/athena/include $(DBG)
 LIBS = -L../lib -L../gdb -L/usr/athena/lib -lmoira -lzephyr -lmrgdb -lcom_err -lhesiod -lkrb -ldes
 SRCDIR = $(SRCTOP)/incremental
 
index 69539a348384c9fab429e50e3b121f44360dab8a..1dee3b86179852c5e500509d37f7d1b72503b02e 100644 (file)
@@ -53,6 +53,7 @@ extern long pr_ChangeEntry();
 extern long pr_SetFieldsEntry();
 extern long pr_AddToGroup();
 extern long pr_RemoveUserFromGroup();
+extern long pr_SIdToName();
 
 static char tbl_buf[1024];
 static struct member {
@@ -180,6 +181,16 @@ int afterc;
               after[U_NAME], auid);
        
        code = pr_try(pr_CreateUser, after[U_NAME], &auid);
+       /* if we get PRIDEXIST, it's only an error if the username
+          doesn't match (otherwise it just means the user was deleted
+          from Moira but not AFS */
+       if (code == PRIDEXIST) {
+           char ename[255];
+           
+           if (pr_try(pr_SIdToName, auid, ename) == 0 &&
+               !strcmp(after[U_NAME], ename))
+               return;
+       }
        if (code) {
            critical_alert("incremental",
                           "Couldn't create user %s (id %d): %s",
@@ -289,6 +300,12 @@ int afterc;
        com_err(whoami, 0, "Creating %s group %s (gid %d)",
               (ahide ? "hidden" : "visible"), after[L_NAME], agid);
        code = pr_try(pr_CreateGroup, g1, g2, &id);
+       if (code == PRIDEXIST) {
+           char ename[255];
+           
+           if (pr_try(pr_SIdToName, -agid, ename) == 0 && !strcmp(g1, ename))
+               return;
+       }
        if (code) {
            critical_alert("incremental",
                           "Couldn't create group %s (id %d): %s",
index bac85bda506a4641e4d8803910d0b7b4f1c20b2f..92d756c3265c51e984279b1fe22db6d7553b5d6e 100644 (file)
@@ -27,6 +27,10 @@ die "Cannot handle $newltype volumes\n" unless $vtype;
 $newvname = $vtype . "." . $newname;
 
 if ($oldtype eq "ERR") {
+    # If volume was never unmounted, we don't need to do anything.
+    system("$fs lsm $oldpath > /dev/null");
+    exit(0) if ($? == 0);
+
     # Lookup volume type for old locker
     ($c = $oldcell) =~ s/\./_/g;
     $vtype = eval "\$vtypes_$c{$oldltype}";
This page took 0.043332 seconds and 5 git commands to generate.