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
SRCS = afs.c ksrvtgt.c
CODE = $(SRCS)
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
LIBS = -L../lib -L../gdb -L/usr/athena/lib -lmoira -lzephyr -lmrgdb -lcom_err -lhesiod -lkrb -ldes
SRCDIR = $(SRCTOP)/incremental
extern long pr_SetFieldsEntry();
extern long pr_AddToGroup();
extern long pr_RemoveUserFromGroup();
extern long pr_SetFieldsEntry();
extern long pr_AddToGroup();
extern long pr_RemoveUserFromGroup();
+extern long pr_SIdToName();
static char tbl_buf[1024];
static struct member {
static char tbl_buf[1024];
static struct member {
after[U_NAME], auid);
code = pr_try(pr_CreateUser, after[U_NAME], &auid);
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",
if (code) {
critical_alert("incremental",
"Couldn't create user %s (id %d): %s",
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);
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",
if (code) {
critical_alert("incremental",
"Couldn't create group %s (id %d): %s",
$newvname = $vtype . "." . $newname;
if ($oldtype eq "ERR") {
$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}";
# Lookup volume type for old locker
($c = $oldcell) =~ s/\./_/g;
$vtype = eval "\$vtypes_$c{$oldltype}";