]> andersk Git - moira.git/commitdiff
make sure proper username is used when updating AFS quota
authormar <mar>
Thu, 14 Dec 1989 13:57:35 +0000 (13:57 +0000)
committermar <mar>
Thu, 14 Dec 1989 13:57:35 +0000 (13:57 +0000)
clients/moira/quota.c

index 8319fa446c9b1bebc034527ec9786b025f6bd443..aef6e7a98cd07201ae39db4033400d42876b0b7f 100644 (file)
@@ -35,6 +35,7 @@ static char * def_quota = NULL;
 #define DEFAULT_FILESYS DEFAULT_NONE
 #define DEFAULT_USER user      /* this is the user who started sms. */
 #define NOBODY "\\[nobody\\]"
+#define OLDNOBODY      "[nobody]"
 
 
 /*     Function Name: GetDefaultUserQuota
@@ -321,6 +322,10 @@ char ** info;
 
   sprintf(temp_buf, "New quota for filesystem %s (in KB)", info[Q_FILESYS]);
   GetValueFromUser(temp_buf, &info[Q_QUOTA]);
+  if (!strcmp(info[Q_LOGIN], OLDNOBODY)) {
+      free(info[Q_LOGIN]);
+      info[Q_LOGIN] = strsave(NOBODY);
+  }
   
   if (status = do_sms_query("update_nfs_quota", 3, info,
                            Scream, (char *) NULL) != SMS_SUCCESS) {
This page took 0.039977 seconds and 5 git commands to generate.