]> andersk Git - moira.git/blobdiff - incremental/afs.c
Initialize the default database to be "sms"
[moira.git] / incremental / afs.c
index b38347bc023e5eb4eeae80b34ef5a63078b11073..d8424cc4049e79b7117157f5c51224716f47b363 100644 (file)
@@ -225,7 +225,7 @@ int afterc;
        if (ahide != bhide) {
            code = pr_SetFieldsEntry
                (-agid, PR_SF_ALLBITS,
-                (ahide ? PRP_STATUS_MEM : PRP_GROUP_DEFAULT) >> PRIVATE_SHIFT,
+                (ahide ? PRP_STATUS_ANY : PRP_GROUP_DEFAULT) >> PRIVATE_SHIFT,
                 0 /*ngroups*/, 0 /*nusers*/);
            if (code) {
                critical_alert("incremental",
@@ -259,7 +259,7 @@ int afterc;
        if (ahide) {
            code = pr_SetFieldsEntry
                (-agid, PR_SF_ALLBITS,
-                (ahide ? PRP_STATUS_MEM : PRP_GROUP_DEFAULT) >> PRIVATE_SHIFT,
+                (ahide ? PRP_STATUS_ANY : PRP_GROUP_DEFAULT) >> PRIVATE_SHIFT,
                 0 /*ngroups*/, 0 /*nusers*/);
            if (code) {
                critical_alert("incremental",
@@ -313,7 +313,7 @@ int afterc;
     if (afterc) 
        edit_group(1, after[LM_LIST], after[LM_TYPE], after[LM_MEMBER]);
     if (beforec)
-       edit_group(0, after[LM_LIST], after[LM_TYPE], after[LM_MEMBER]);
+       edit_group(0, before[LM_LIST], before[LM_TYPE], before[LM_MEMBER]);
 }
 
 
@@ -328,7 +328,8 @@ get_members(ac, av, group)
        sleep(1);                               /* give the ptserver room */
        edit_group(1, group, av[0], av[1]);
     } else {
-       code = mr_query("get_members_of_list", 1, &av[1], get_members, group);
+       code = mr_query("get_end_members_of_list", 1, &av[1],
+                       get_members, group);
        if (code)
            critical_alert("incremental",
                           "Couldn't retrieve full membership of %s: %s",
@@ -413,6 +414,26 @@ int afterc;
      * LABEL change: rename/remount
      * Deletion: rename/unmount
      */
+    if (afterc < FS_CREATE) {
+       if (!strcmp(before[FS_TYPE], "AFS"))
+           critical_alert("incremental",
+                          "Could not delete AFS filesystem %s: Operation not supported\n",
+                          before[FS_NAME]);
+       return;
+    }
+
+    if (!strcmp(after[FS_TYPE], "AFS")) {
+       if (strcmp(before[FS_TYPE], "AFS")) {
+           critical_alert("incremental",
+                          "Cannot convert %s to an AFS filesystem: Operation not supported\n",
+                          after[FS_NAME]);
+       } else {
+           critical_alert("incremental",
+                          "Cannot change attributes of AFS filesystem %s: Operation not supported\n",
+                          after[FS_NAME]);
+       }
+       return;
+    }
 }
 
 
This page took 0.033815 seconds and 4 git commands to generate.