WHERE s.snet_id=:id;
mid =0;
} else if (q->type == RETRIEVE) {
-/* name = argv[0];
- EXEC SQL SELECT m.owner_type, m.owner_id, s.owner_type, s.owner_id
- INTO :mtype, :mid, :stype, :sid FROM machine m, subnet s
- WHERE m.name=:name and s.snet_id=m.snet_id;
-*/
return(MR_SUCCESS);
} else {
id = *(int *)argv[0];
char *client_type;
int status, client_id;
+ if (q->type == RETRIEVE)
+ return(MR_SUCCESS);
+
id = *(int *)argv[1];
EXEC SQL SELECT count(name) INTO :cnt from hostalias WHERE mach_id = :id;
*/
if (q->type == APPEND && cnt >= 2)
return(MR_PERM);
-
EXEC SQL SELECT m.owner_type, m.owner_id, s.owner_type, s.owner_id
INTO :mtype, :mid, :stype, :sid FROM machine m, subnet s
WHERE m.mach_id=:id and s.snet_id=m.snet_id;
else
return(MR_PERM);
}
+
+
+
+/* access_snt - check for retrieving network structure
+ */
+
+access_snt(q, argv, cl)
+ struct query *q;
+ char *argv[];
+ client *cl;
+{
+ if(q->type == RETRIEVE)
+ return(MR_SUCCESS);
+
+ return(MR_PERM);
+}