]> andersk Git - moira.git/commitdiff
do nfsphys checks for IMAP filesystems as well as NFS ones.
authordanw <danw>
Tue, 16 Nov 1999 20:54:10 +0000 (20:54 +0000)
committerdanw <danw>
Tue, 16 Nov 1999 20:54:10 +0000 (20:54 +0000)
fix a typo in the gfsn query help.
make gfsn work on any kind of filesystem (that has an nfsphys)

server/qsetup.pc
server/queries2.c

index 0cd6b5fdc4bd90bb863d5dc945beaeab5445bce4..2baf45eca6c2e0037181fecdc072ed8d41d3de44 100644 (file)
@@ -513,7 +513,7 @@ int setup_dshi(struct query *q, char *argv[], client *cl)
  ** Description:
  **   - for type = RVD:
  **       * allow anything
- **   - for type = NFS:
+ **   - for type = NFS/IMAP:
  **        * extract directory prefix from name
  **        * verify mach_id/dir in nfsphys
  **        * verify rwaccess in {r, w, R, W}
@@ -557,7 +557,7 @@ int setup_afil(struct query *q, char *argv[], client *cl)
   if ((mr_errcode = prefetch_value(q, argv, cl)) != MR_SUCCESS)
     return mr_errcode;
 
-  if (!strcmp(type, "NFS"))
+  if (!strcmp(type, "NFS") || !strcmp(type, "IMAP"))
     return check_nfs(mach_id, name, rwaccess);
 
   return MR_SUCCESS;
@@ -601,7 +601,7 @@ int setup_ufil(struct query *q, char *argv[], client *cl)
   if (dbms_errno)
     return mr_errcode;
 
-  if (!strcmp(type, "NFS"))
+  if (!strcmp(type, "NFS") || !strcmp(type, "IMAP"))
     {
       status = check_nfs(mach_id, name, access);
       EXEC SQL UPDATE quota SET phys_id = :_var_phys_id
index 0012cdbc618af580a59271aff880e9d4bbe49dff..565e6160e14901c6e70c09c138f75fc87d06f480 100644 (file)
@@ -1532,7 +1532,7 @@ static struct validate gfsm_validate = {
 };
 
 static char *gfsn_fields[] = {
-  "machine", "parition",
+  "machine", "partition",
   "label", "type", "machine", "name", "mount", "access", "comments",
   "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
 };
@@ -3941,7 +3941,7 @@ struct query Queries2[] = {
     "fs.label, fs.type, m.name, fs.name, fs.mount, fs.rwaccess, fs.comments, u.login, l.name, fs.createflg, fs.lockertype, TO_CHAR(fs.modtime, 'DD-mon-YYYY HH24:MI:SS'), fs.modby, fs.modwith FROM filesys fs, machine m, users u, list l, nfsphys np",
     gfsn_fields,
     14,
-    "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id AND np.nfsphys_id = fs.phys_id AND np.dir LIKE '%s' AND fs.type = 'NFS'",
+    "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id AND np.nfsphys_id = fs.phys_id AND np.dir LIKE '%s'",
     2,
     "fs.label",
     &gfsn_validate,
This page took 0.04372 seconds and 5 git commands to generate.