extern long pr_SetFieldsEntry();
extern long pr_AddToGroup();
extern long pr_RemoveUserFromGroup();
+extern long pr_SIdToName();
static char tbl_buf[1024];
static struct member {
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",
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",
$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}";