]> andersk Git - moira.git/commitdiff
Forgot to put uid's in credentials file
authormar <mar>
Fri, 19 Aug 1988 14:42:01 +0000 (14:42 +0000)
committermar <mar>
Fri, 19 Aug 1988 14:42:01 +0000 (14:42 +0000)
gen/nfs.qc

index af52f3a38c724a1cd46ef79164b5497de47c6b69..b910205e02502a2bed46cd847c6abe1416ea5b31 100644 (file)
@@ -175,6 +175,7 @@ struct grp {
 };
 struct user {
     char name[9];
+    int uid;
     struct grp *lists;
 };
 
@@ -246,9 +247,11 @@ struct hash *do_everyone()
     /* now do grplists */
     users = create_hash(10000);
 ##  range of u is users
-##  retrieve (id = u.users_id, name = u.login) where u.status = 1 {
+##  retrieve (id = u.users_id, name = u.login, uid = u.#uid)
+##      where u.status = 1 {
       u = (struct user *) malloc(sizeof(struct user));
       strcpy(u->name, strtrim(name));
+      u->uid = uid;
       u->lists = NULL;
       hash_store(users, id, u);
 ##  }
@@ -265,8 +268,9 @@ struct hash *do_everyone()
 
     for (p = &(users->data[users->size - 1]); p >= users->data; p--) {
        for (b = *p; b; b = b->next) {
-           strcpy(buf, ((struct user *)b->data)->name);
-           for (g = ((struct user *)b->data)->lists; g; g = g->next)
+           u = (struct user *)b->data;
+           sprintf(buf, "%s:%d", u->name, u->uid);
+           for (g = u->lists; g; g = g->next)
              if (l = hash_lookup(groups, g->id))
                strcat(buf, l);
            /* should free stuff here... */
This page took 2.163576 seconds and 5 git commands to generate.