+ if (name__sanitise(gr->gr_name, buf, sizeof(buf)) &&
+ (n = name__get(buf, clType_user)) != 0) {
+
+ /* --- Now add all of the members --- */
+
+ for (p = gr->gr_mem; *p; p++) {
+ if ((pw = userdb_userByName(*p)) != 0) {
+ u = pw->pw_uid;
+ sym_find(n->c->t, (char *)&u, sizeof(u), sizeof(sym_base), 0);
+ }
+ }
+ }
+ }
+}
+
+/* --- @name__scan@ --- *
+ *
+ * Arguments: @netg *n@ = the netgroup handle we're scanning
+ * @const char *host@ = the host name
+ * @const char *user@ = the user name
+ * @const char *domain@ = the (NIS?) domain name
+ * @void *ctx@ = some context pointer
+ *
+ * Returns: Zero to continue scanning.
+ *
+ * Use: Scans a netgroup, adding items to the name table.
+ */
+
+/* --- A data type --- */
+
+typedef struct name__scanctx {
+ char *name; /* Netgroup name prefixed with `?_'*/
+ unsigned f; /* Various interesting flags */
+ name *h; /* Name entry for hosts */
+ name *u; /* Name entry for users */
+} name__scanctx;
+
+enum { f_host = 1, f_user = 2 };
+
+/* --- And now for the real code --- */