int createflag, setinfo, active, public, hidden, maillist, grouplist;
int nfsgroup, mailman;
struct member *owner, *memacl;
-char *desc, *newname, *mailman_server;
+char *desc, *newname, *mailman_server, *gid;
/* various member lists */
struct save_queue *addlist, *dellist, *memberlist, *synclist, *taglist;
noauth = showusers = showstrings = showkerberos = showlists = 0;
showtags = showmachines = createflag = setinfo = 0;
active = public = hidden = maillist = grouplist = nfsgroup = mailman = -1;
- listname = newname = desc = NULL;
+ listname = newname = desc = gid = NULL;
owner = NULL;
memacl = NULL;
addlist = sq_create();
else
usage(argv);
}
+ else if (argis("g", "gid"))
+ {
+ if (arg - argv < argc - 1)
+ {
+ setinfo++;
+ ++arg;
+ gid = *arg;
+ }
+ else
+ usage(argv);
+ }
else
usage(argv);
}
/* If none of {users,strings,lists,kerberos,machines} specified,
turn them all on */
- if (!(showusers || showstrings || showlists || showkerberos))
+ if (!(showusers || showstrings || showlists || showkerberos || showmachines))
showusers = showstrings = showlists = showkerberos = showmachines = 1;
/* fire up Moira */
argv[L_HIDDEN] = (hidden == 1) ? "1" : "0";
argv[L_MAILLIST] = (maillist == 0) ? "0" : "1";
argv[L_GROUP] = (grouplist == 1) ? "1" : "0";
- argv[L_GID] = UNIQUE_GID;
+
+ if (gid)
+ argv[L_GID] = gid;
+ else
+ argv[L_GID] = UNIQUE_GID;
+
argv[L_NFSGROUP] = (nfsgroup == 1) ? "1" : "0";
argv[L_MAILMAN] = (mailman == 1) ? "1" : "0";
argv[L_DESC] = desc ? desc : "none";
argv[L_MAILLIST + 1] = maillist ? "1" : "0";
if (grouplist != -1)
argv[L_GROUP + 1] = grouplist ? "1" : "0";
+ if (gid)
+ argv[L_GID + 1] = gid;
if (nfsgroup != -1)
argv[L_NFSGROUP + 1] = nfsgroup ? "1" : "0";
if (mailman != -1)
memberstruct->name, listname);
success = 0;
}
+ case M_MACHINE:
+ membervec[1] = "MACHINE";
+ status = mr_query("tag_member_of_list", 4, membervec,
+ NULL, NULL);
+ if (status != MR_SUCCESS)
+ {
+ com_err(whoami, status, "while adding member %s to %s",
+ memberstruct->name, listname);
+ success = 0;
+ }
}
}