case 'K':
dtypes[dcount] = "KERBEROS";
break;
+ case 'M':
+ dtypes[dcount] = "MACHINE";
+ break;
default:
error++;
break;
case 'K':
dtypes[dcount] = "KERBEROS";
break;
+ case 'M':
+ dtypes[dcount] = "MACHINE";
+ break;
default:
error++;
break;
/* get_lists_of_member - given a type and a name, return the name and flags
* of all of the lists of the given member. The member_type is one of
- * "LIST", "USER", "STRING", "RLIST", "RUSER", or "RSTRING" in argv[0],
- * and argv[1] will contain the ID of the entity in question. The R*
- * types mean to recursively look at every containing list, not just
- * when the object in question is a direct member.
+ * "LIST", "USER", "STRING", "KERBEROS", "MACHINE", "RLIST", "RUSER",
+ * "RSTRING", "RKERBEROS", or "RMACHINE" in argv[0], and argv[1] will contain
+ * the ID of the entity in question. The R* types mean to recursively look
+ * at every containing list, not just when the object in question is a direct
+ * member.
*/
int get_lists_of_member(struct query *q, char *argv[], client *cl,
atype = "KERBEROS";
direct = 0;
}
+ if (!strcmp(atype, "RMACHINE"))
+ {
+ atype = "MACHINE";
+ direct = 0;
+ }
rargv[0] = name;
rargv[1] = active;
if (dbms_errno)
return mr_errcode;
+ targv[0] = "MACHINE";
+ EXEC SQL DECLARE csr123 CURSOR FOR
+ SELECT m.name, s.string FROM machine m, imembers im, strings s
+ WHERE im.list_id = :list_id AND im.member_type = 'MACHINE'
+ AND im.member_id = m.mach_id AND im.direct > :direct
+ AND s.string_id = im.tag ORDER BY 1;
+ if (dbms_errno)
+ return mr_errcode;
+ EXEC SQL OPEN csr123;
+ if (dbms_errno)
+ return mr_errcode;
+ while (1)
+ {
+ EXEC SQL FETCH csr123 INTO :member_name, :tag;
+ if (sqlca.sqlcode)
+ break;
+ (*action)(targc, targv, actarg);
+ }
+ EXEC SQL CLOSE csr123;
+ if (dbms_errno)
+ return mr_errcode;
+
return MR_SUCCESS;
}
nstatus = 1;
EXEC SQL UPDATE users SET login = :login, status = :nstatus,
modtime = SYSDATE, modby = :who, modwith = :entity,
- pmodtime = SYSDATE, pmodby = :who, pmodwith = :entity
+ pmodtime = SYSDATE, pmodby = :who, pmodwith = :entity,
+ created = SYSDATE, creator = :who
WHERE users_id = :users_id;
if (dbms_errno)