* The following zones are generated: passwd, uid, pobox, group,
* grplist, gid, filsys, cluster, pcap, sloc, service.
*
- * (c) Copyright 1988 by the Massachusetts Institute of Technology.
+ * (c) Copyright 1988, 1990 by the Massachusetts Institute of Technology.
* For copying and distribution information, please see the file
* <mit-copyright.h>.
*/
EXEC SQL BEGIN DECLARE SECTION;
char login[9], shell[33], fullname[33], oa[17], op[13], hp[17];
char nn[17], ptype[9];
- int uid, flag1, flag2, id, pid;
+ int uid, flag1, flag2, id, pid, status;
EXEC SQL END DECLARE SECTION;
sprintf(poutf, "%s/passwd.db", hesiod_dir);
users = create_hash(12001);
EXEC SQL DECLARE u_cursor CURSOR FOR
SELECT login, uid, shell, fullname, nickname, office_addr,
- office_phone, home_phone, users_id, pop_id, potype
+ office_phone, home_phone, users_id, pop_id, potype, status
FROM users
- WHERE status = 1;
+ WHERE status = 1 or status = 6;
EXEC SQL OPEN u_cursor;
while (1) {
EXEC SQL FETCH u_cursor INTO :login, :uid, :shell, :fullname, :nn,
- :oa, :op, :hp, :id, :pid, :ptype;
+ :oa, :op, :hp, :id, :pid, :ptype, :status;
if (sqlca.sqlcode != 0) break;
strtrim(login);
dequote(fullname);
strcpy(u->name, login);
u->lists = NULL;
hash_store(users, id, u);
- fprintf(pout, "%s.passwd\tHS %s \"%s:*:%d:101:%s,%s,%s,%s,%s:/mit/%s:%s\"\n",
- login, HTYPE, login, uid, fullname, nn, oa, op, hp, login, shell);
- fprintf(uout, "%d.uid\tHS CNAME %s.passwd\n", uid, login);
+ if (status == 1) {
+ fprintf(pout, "%s.passwd\tHS %s \"%s:*:%d:101:%s,%s,%s,%s,%s:/mit/%s:%s\"\n",
+ login, HTYPE, login, uid, fullname, nn, oa, op, hp,
+ login, shell);
+ fprintf(uout, "%d.uid\tHS CNAME %s.passwd\n", uid, login);
+ }
if (ptype[0] == 'P' && (mach = hash_lookup(machines, pid))) {
fprintf(bout, "%s.pobox\tHS %s \"POP %s %s\"\n",
login, HTYPE, mach, login);
do_filsys()
{
FILE *out;
- char outf[64], outft[64], *mach, machbuf[128], *group;
+ char outf[64], outft[64], *mach, *group;
register char *p;
struct stat sb;
time_t ftime;
strtrim(type);
if (!strcmp(type, "NFS") || !strcmp(type, "RVD")) {
if (mach = hash_lookup(machines, id)) {
- for (p = machbuf; *mach && *mach != '.'; mach++) {
- if (isupper(*mach))
- *p++ = tolower(*mach);
- else
- *p++ = *mach;
- }
- *p = 0;
fprintf(out, "%s.filsys\tHS %s \"%s %s %s %s %s\"\n",
- strtrim(name), HTYPE, type, strtrim(loc), machbuf,
+ strtrim(name), HTYPE, type, strtrim(loc), mach,
strtrim(access), strtrim(mount));
}
} else if (!strcmp(type, "AFS")) {
strtrim(type);
if (!strcmp(type, "NFS") || !strcmp(type, "RVD")) {
if (mach = hash_lookup(machines, id)) {
- for (p = machbuf; *mach && *mach != '.'; mach++) {
- if (isupper(*mach))
- *p++ = tolower(*mach);
- else
- *p++ = *mach;
- }
- *p = 0;
fprintf(out, "%s.filsys\tHS %s \"%s %s %s %s %s\"\n",
- group, HTYPE, type, strtrim(loc), machbuf,
+ group, HTYPE, type, strtrim(loc), mach,
strtrim(access), strtrim(mount));
}
} else if (!strcmp(type, "AFS")) {