3 * This generates a master /etc/passwd containing all active (status != 0)
14 char *ingres_date_and_time();
22 char *outf, outft[64];
24 ## char login[9], shell[33], fullname[33], oa[17], op[13], hp[17], *filetime;
25 ## int uid, error, flag;
30 if (stat(argv[1], &sb) == 0) {
31 filetime = ingres_date_and_time(sb.st_mtime);
32 ## retrieve (flag = int4(interval("min", tblstats.modtime - filetime)))
33 ## where tblstats.table = "users"
35 fprintf(stderr, "File %s does not need to be rebuilt.\n",
41 sprintf(outft, "%s~", outf);
42 if ((out = fopen(outft, "w")) == NULL) {
43 fprintf(stderr, "unable to open %s for output\n", outf);
46 } else if (argc != 1) {
47 fprintf(stderr, "usage: %s [outfile]\n", argv[0]);
53 ## set lockmode on users where readlock = nolock
55 ## range of u is users
56 ## retrieve (login = u.#login, uid = u.#uid, shell = u.#shell,
57 ## fullname = u.#fullname, oa = u.office_addr,
58 ## op = u.office_phone, hp = u.home_phone)
59 ## where u.status = 1 {
66 fprintf(out, "%s:*:%d:101:%s,%s,%s,%s:/mit/%s:%s\n",
67 login, uid, fullname, oa, op, hp, login, shell);
69 ## inquire_equel(error = "errorno")
71 fprintf(out, "Ingres error %d\n", error);
78 perror("close failed");