]> andersk Git - moira.git/commitdiff
don't allow a user with non-zero status to be deleted; don't allow
authormar <mar>
Wed, 3 Aug 1988 18:36:13 +0000 (18:36 +0000)
committermar <mar>
Wed, 3 Aug 1988 18:36:13 +0000 (18:36 +0000)
a machine which is a printer-spooler to be deleted; don't allow
backslashes in names; don't reset the DCM inprogress bits

server/qsupport.qc

index 62e3728a39d38743a81d861278c838e7a607e831..ebaa1d8f2465d337747a4b44ca8c9e9741cf802f 100644 (file)
@@ -345,6 +345,12 @@ int setup_dusr(q, argv)
 ##  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"))
@@ -438,6 +444,9 @@ int setup_dmac(q, argv)
 ##  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);
@@ -2396,7 +2405,7 @@ validate_fields(q, argv, vo, n)
 
 /* 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 */
@@ -2404,7 +2413,7 @@ static int illegalchars[] = {
     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,
@@ -2675,6 +2684,4 @@ char *name;
 
 sanity_check_database()
 ##{
-##  replace servers (inprogress = 0)
-##  replace serverhosts (inprogress = 0)
 ##}
This page took 0.037936 seconds and 5 git commands to generate.