char **after;
int afterc;
{
- char cmd[512];
+ char cmd[512], *p;
if ((beforec < 4 || !atoi(before[LM_END])) &&
(afterc < 4 || !atoi(after[LM_END])))
do_cmd(cmd);
return;
}
+ if (beforec == 0 && !strcmp(after[LM_TYPE], "KERBEROS")) {
+ p = index(after[LM_MEMBER], '@');
+ if (p) *p = 0;
+ sprintf(cmd, "%s adduser -user %s -group system:%s",
+ pts, after[LM_MEMBER], after[LM_LIST]);
+ do_cmd(cmd);
+ return;
+ }
+ if (afterc == 0 && !strcmp(before[LM_TYPE], "KERBEROS")) {
+ p = index(before[LM_MEMBER], '@');
+ if (p) *p = 0;
+ sprintf(cmd, "%s removeuser -user %s -group system:%s",
+ pts, before[LM_MEMBER], before[LM_LIST]);
+ do_cmd(cmd);
+ return;
+ }
}
char **after;
int afterc;
{
- if (afterc < FS_CREATE)
+ char cmd[512];
+
+ if (afterc < FS_CREATE ||
+ strcmp("AFS", after[FS_TYPE]))
return;
- if (!strcmp("AFS", after[FS_TYPE]) &&
+ if (beforec < FS_CREATE) {
+ /* new locker creation */
+ sprintf(cmd, "%s/afs_create.pl %s %s %s %s %s %s %s %s %s",
+ BIN_DIR, after[FS_LABEL], after[FS_LOCKERTYPE],
+ after[FS_MACHINE], after[FS_PACK], 2200, after[FS_OWNER],
+ 0, after[FS_OWNERS], 0);
+ do_cmd(cmd);
+ return;
+ } else if (strcmp(before[FS_TYPE], "AFS")) {
+ /* moved from non-AFS */
+ } else {
+ /* other modification */
!strncmp("/afs/", after[FS_PACK], 5) &&
atoi(after[FS_CREATE]) &&
!file_exists(after[FS_PACK])) {