## int flag, id;
id = *(int *)argv[0];
+
+ /* For now, only allow users to be deleted if their status is 0 */
+## repeat retrieve (flag = u.status) where u.users_id = @id
+ if (flag != 0)
+ return(SMS_IN_USE);
+
## repeat delete nfsquota where nfsquota.users_id = @id
## repeat retrieve (flag = any(members.member_id where members.member_id=@id
## and members.member_type = "USER"))
## repeat retrieve (flag = any(hostaccess.mach_id where hostaccess.mach_id=@id))
if (flag)
return(SMS_IN_USE);
+## repeat retrieve (flag = any(pcap.mach_id where pcap.mach_id=@id))
+ if (flag)
+ return(SMS_IN_USE);
## repeat delete mcmap where mcmap.mach_id = @id
return(SMS_SUCCESS);
/* validate_chars: verify that there are no illegal characters in
* the string. Legal characters are printing chars other than
- * ", *, ?, [ and ].
+ * ", *, ?, \, [ and ].
*/
static int illegalchars[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* ^@ - ^O */
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, /* SPACE - / */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0 - ? */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* @ - O */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, /* P - _ */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, /* P - _ */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ` - o */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* p - ^? */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
sanity_check_database()
##{
-## replace servers (inprogress = 0)
-## replace serverhosts (inprogress = 0)
##}