[1529] in Moira
Re: proposed changes for adding a new field to User table
daemon@ATHENA.MIT.EDU (Qing Dong)
Thu Apr 13 17:43:20 2000
Message-Id: <200004132143.RAA29805@melbourne-city-street.MIT.EDU>
Date: Thu, 13 Apr 2000 17:43:17 -0400
To: Garry Zacheiss <zacheiss@mit.edu>
From: Qing Dong <dongq@MIT.EDU>
Cc: moiradev@mit.edu, pbh@mit.edu, dalmeida@mit.edu
In-Reply-To: <200004131726.NAA27390@shock-treatment.mit.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
I made modifications to the proposed changes following Garry's suggestion.
I will make changes to the man pages later.
Thanks.
Index: addusr.c
===================================================================
RCS file:
\\dongq-afs\all\athena.mit.edu\astaff\project\moiradev\repository/moira/clie
nts/addusr/addusr.c,v
retrieving revision 1.17
diff -c -r1.17 addusr.c
*** addusr.c 2000/03/15 22:43:55 1.17
--- addusr.c 2000/04/11 17:08:03
***************
*** 27,34 ****
#define DEFAULT_SHELL "/bin/csh"
#endif
/* flags from command line */
! char *class, *comment, *status_str, *shell, *filename;
int reg_only, reg, verbose, nodupcheck, securereg;
/* argument parsing macro */
--- 27,36 ----
#define DEFAULT_SHELL "/bin/csh"
#endif
+ #define DEFAULT_WINCONSOLESHELL "cmd"
+
/* flags from command line */
! char *class, *comment, *status_str, *shell, *winconsoleshell, *filename;
int reg_only, reg, verbose, nodupcheck, securereg;
/* argument parsing macro */
***************
*** 54,59 ****
--- 56,62 ----
server = NULL;
filename = "-";
shell = DEFAULT_SHELL;
+ winconsoleshell = DEFAULT_WINCONSOLESHELL;
class = "TEMP";
comment = "";
status_str = "0";
***************
*** 105,110 ****
--- 108,123 ----
else
usage(argv);
}
+ else if (argis("w", "winshell"))
+ {
+ if (arg - argv < argc - 1)
+ {
+ ++arg;
+ winconsoleshell = *arg;
+ }
+ else
+ usage(argv);
+ }
else if (argis("6", "secure"))
securereg++;
else if (argis("r", "reg_only"))
***************
*** 155,166 ****
}
/* fire up Moira */
! if (mrcl_connect(server, "addusr", 2, 1) != MRCL_SUCCESS)
exit(2);
qargv[U_NAME] = UNIQUE_LOGIN;
qargv[U_UID] = UNIQUE_UID;
qargv[U_SHELL] = shell;
qargv[U_STATE] = status_str;
qargv[U_CLASS] = class;
qargv[U_COMMENT] = comment;
--- 168,180 ----
}
/* fire up Moira */
! if (mrcl_connect(server, "addusr", 3, 1) != MRCL_SUCCESS)
exit(2);
qargv[U_NAME] = UNIQUE_LOGIN;
qargv[U_UID] = UNIQUE_UID;
qargv[U_SHELL] = shell;
+ qargv[U_WINCONSOLESHELL] = winconsoleshell;
qargv[U_STATE] = status_str;
qargv[U_CLASS] = class;
qargv[U_COMMENT] = comment;
***************
*** 338,343 ****
--- 352,358 ----
fprintf(stderr, " -C | -comment \"comment\" (default \"\")\n");
fprintf(stderr, " -s | -status status (default 0)\n");
fprintf(stderr, " -h | -shell shell (default %s)\n", DEFAULT_SHELL);
+ fprintf(stderr, " -w | -winshell windows console shell (default
%s)\n", DEFAULT_WINCONSOLESHELL);
fprintf(stderr, " -r | -reg_only\n");
fprintf(stderr, " -R | -register (and add to database)\n");
fprintf(stderr, " -v | -verbose\n");
Index: user.c
===================================================================
RCS file:
\\dongq-afs\all\athena.mit.edu\astaff\project\moiradev\repository/moira/clie
nts/moira/user.c,v
retrieving revision 1.60
diff -c -r1.60 user.c
*** user.c 2000/03/22 23:04:14 1.60
--- user.c 2000/04/13 19:33:21
***************
*** 46,51 ****
--- 46,52 ----
#endif
#define DEFAULT_CLASS "?"
+ #define DEFAULT_WINCONSOLESHELL "cmd"
/* Function Name: UserState
* Description: Convert a numeric state into a descriptive string.
***************
*** 109,114 ****
--- 110,118 ----
sprintf(buf, "User id: %-23s Login shell %-10s Class: %s",
info[U_UID], info[U_SHELL], info[U_CLASS]);
Put_message(buf);
+ sprintf(buf, "Windows Console Shell: %-10s",
+ info[U_WINCONSOLESHELL]);
+ Put_message(buf);
sprintf(buf, "Account is: %-20s MIT ID number: %s",
UserState(atoi(info[U_STATE])), info[U_MITID]);
***************
*** 137,142 ****
--- 141,147 ----
info[U_NAME] = strdup(UNIQUE_LOGIN);
info[U_UID] = strdup(UNIQUE_UID);
info[U_SHELL] = strdup(DEFAULT_SHELL);
+ info[U_WINCONSOLESHELL] = strdup(DEFAULT_WINCONSOLESHELL);
info[U_LAST] = strdup(DEFAULT_NONE);
info[U_FIRST] = strdup(DEFAULT_NONE);
info[U_MIDDLE] = strdup(DEFAULT_NONE);
***************
*** 252,257 ****
--- 257,266 ----
if (GetValueFromUser("User's shell", &info[U_SHELL]) == SUB_ERROR)
return NULL;
+
+ if (GetValueFromUser("Windows console shell", &info[U_WINCONSOLESHELL])
== SUB_ERROR)
+ return NULL;
+
if (name)
{
if (GetValueFromUser("User's last name", &info[U_LAST]) == SUB_ERROR)
Index: main.c
===================================================================
RCS file:
\\dongq-afs\all\athena.mit.edu\astaff\project\moiradev\repository/moira/clie
nts/moira/main.c,v
retrieving revision 1.38
diff -c -r1.38 main.c
*** main.c 2000/03/15 22:44:03 1.38
--- main.c 2000/04/11 16:02:12
***************
*** 106,112 ****
}
}
! if (mrcl_connect(moira_server, program_name, 2, 0) != MRCL_SUCCESS)
exit(1);
if ((status = mr_auth(program_name)))
--- 106,112 ----
}
}
! if (mrcl_connect(moira_server, program_name, 3, 0) != MRCL_SUCCESS)
exit(1);
if ((status = mr_auth(program_name)))
Index: schema.sql
===================================================================
RCS file:
\\dongq-afs\all\athena.mit.edu\astaff\project\moiradev\repository/moira/db/s
chema.sql,v
retrieving revision 1.14
diff -c -r1.14 schema.sql
*** schema.sql 2000/02/05 00:43:37 1.14
--- schema.sql 2000/04/10 15:04:36
***************
*** 4,9 ****
--- 4,10 ----
users_id INTEGER DEFAULT 0 NOT NULL,
unix_uid SMALLINT DEFAULT 0 NOT NULL,
shell VARCHAR(32) DEFAULT CHR(0) NOT NULL,
+ winconsoleshell VARCHAR(32) DEFAULT CHR(0) NOT NULL,
last VARCHAR(30) DEFAULT CHR(0) NOT NULL,
first VARCHAR(30) DEFAULT CHR(0) NOT NULL,
middle VARCHAR(30) DEFAULT CHR(0) NOT NULL,
Index: moira_site.h
===================================================================
RCS file:
\\dongq-afs\all\athena.mit.edu\astaff\project\moiradev\repository/moira/incl
ude/moira_site.h,v
retrieving revision 1.33
diff -c -r1.33 moira_site.h
*** moira_site.h 2000/01/06 21:09:37 1.33
--- moira_site.h 2000/04/13 19:38:26
***************
*** 336,359 ****
#define SN_MODWITH 11
#define SN_END 12
! /* User Information queries */
#define U_NAME 0
#define U_UID 1
#define U_SHELL 2
! #define U_LAST 3
! #define U_FIRST 4
! #define U_MIDDLE 5
! #define U_STATE 6
! #define U_MITID 7
! #define U_CLASS 8
! #define U_COMMENT 9
! #define U_SIGNATURE 10
! #define U_SECURE 11
! #define U_MODTIME 12
! #define U_MODBY 13
! #define U_MODWITH 14
! #define U_END 15
/* User states (the value of argv[U_STATE] from a user query) */
--- 336,360 ----
#define SN_MODWITH 11
#define SN_END 12
! /* User Information queries, v3.*/
#define U_NAME 0
#define U_UID 1
#define U_SHELL 2
! #define U_WINCONSOLESHELL 3
! #define U_LAST 4
! #define U_FIRST 5
! #define U_MIDDLE 6
! #define U_STATE 7
! #define U_MITID 8
! #define U_CLASS 9
! #define U_COMMENT 10
! #define U_SIGNATURE 11
! #define U_SECURE 12
! #define U_MODTIME 13
! #define U_MODBY 14
! #define U_MODWITH 15
! #define U_END 16
/* User states (the value of argv[U_STATE] from a user query) */
Index: qfollow.pc
===================================================================
RCS file:
\\dongq-afs\all\athena.mit.edu\astaff\project\moiradev\repository/moira/serv
er/qfollow.pc,v
retrieving revision 2.14
diff -c -r2.14 qfollow.pc
*** qfollow.pc 2000/01/28 00:31:57 2.14
--- qfollow.pc 2000/04/13 19:43:51
***************
*** 318,326 ****
**
** Inputs:
** argv[0] - login (add_user)
! ** argv[3] - last name
! ** argv[4] - first name
! ** argv[5] - middle name
**
**/
--- 318,326 ----
**
** Inputs:
** argv[0] - login (add_user)
! ** argv[U_LAST] - last name
! ** argv[U_FIRST] - first name
! ** argv[U_MIDDLE] - middle name
**
**/
***************
*** 333,344 ****
EXEC SQL END DECLARE SECTION;
/* build fullname */
! if (strlen(argv[4]) && strlen(argv[5]))
! sprintf(fullname, "%s %s %s", argv[4], argv[5], argv[3]);
! else if (strlen(argv[4]))
! sprintf(fullname, "%s %s", argv[4], argv[3]);
else
! sprintf(fullname, "%s", argv[3]);
login = argv[0];
who = cl->client_id;
--- 333,344 ----
EXEC SQL END DECLARE SECTION;
/* build fullname */
! if (strlen(argv[U_FIRST]) && strlen(argv[U_MIDDLE]))
! sprintf(fullname, "%s %s %s", argv[U_FIRST], argv[U_MIDDLE],
argv[U_LAST]);
! else if (strlen(argv[U_FIRST]))
! sprintf(fullname, "%s %s", argv[U_FIRST], argv[U_LAST]);
else
! sprintf(fullname, "%s", argv[U_LAST]);
login = argv[0];
who = cl->client_id;
Index: qsetup.pc
===================================================================
RCS file:
\\dongq-afs\all\athena.mit.edu\astaff\project\moiradev\repository/moira/serv
er/qsetup.pc,v
retrieving revision 2.36
diff -c -r2.36 qsetup.pc
*** qsetup.pc 2000/01/11 19:50:25 2.36
--- qsetup.pc 2000/04/11 14:58:56
***************
*** 62,69 ****
else
row = 1;
! if (strlen(argv[row + 2]) + strlen(argv[row + 3]) +
! strlen(argv[row + 4]) + 2 > USERS_FULLNAME_SIZE)
return MR_ARG_TOO_LONG;
if (!strcmp(argv[row], UNIQUE_UID) || atoi(argv[row]) == -1)
--- 62,69 ----
else
row = 1;
! if (strlen(argv[row + 3]) + strlen(argv[row + 4]) +
! strlen(argv[row + 5]) + 2 > USERS_FULLNAME_SIZE)
return MR_ARG_TOO_LONG;
if (!strcmp(argv[row], UNIQUE_UID) || atoi(argv[row]) == -1)
Index: queries2.c
===================================================================
RCS file:
\\dongq-afs\all\athena.mit.edu\astaff\project\moiradev\repository/moira/serv
er/queries2.c,v
retrieving revision 2.69
diff -c -r2.69 queries2.c
*** queries2.c 2000/03/30 22:01:56 2.69
--- queries2.c 2000/04/13 21:22:35
***************
*** 67,89 ****
/* Query data */
! static char *galo_fields[] = {
"login", "unix_uid", "shell", "last", "first", "middle",
};
! static char *gual_fields[] = {
"login",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
};
! static char *gubl_fields[] = {
"login",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
static struct validate gubl_validate =
{
0,
--- 67,106 ----
/* Query data */
! static char *galo2_fields[] = {
"login", "unix_uid", "shell", "last", "first", "middle",
};
! static char *galo_fields[] = {
! "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle",
! };
!
! static char *gual2_fields[] = {
"login",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
};
! static char *gual_fields[] = {
! "login",
! "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
! "clearid", "class", "comments", "signature", "secure",
! "modtime", "modby", "modwith",
! };
!
! static char *gubl2_fields[] = {
"login",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
+ static char *gubl_fields[] = {
+ "login",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
+ "clearid", "class", "modtime", "modby", "modwith",
+ };
+
static struct validate gubl_validate =
{
0,
***************
*** 97,104 ****
--- 114,135 ----
followup_fix_modby,
};
+ static char *guau2_fields[] = {
+ "unix_uid",
+ "login", "unix_uid", "shell", "last", "first", "middle", "status",
+ "clearid", "class", "comments", "signature", "secure",
+ "modtime", "modby", "modwith",
+ };
+
static char *guau_fields[] = {
"unix_uid",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
+ "clearid", "class", "comments", "signature", "secure",
+ "modtime", "modby", "modwith",
+ };
+
+ static char *guan2_fields[] = {
+ "first", "last",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
***************
*** 106,112 ****
static char *guan_fields[] = {
"first", "last",
! "login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
};
--- 137,143 ----
static char *guan_fields[] = {
"first", "last",
! "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
};
***************
*** 124,131 ****
--- 155,176 ----
followup_fix_modby,
};
+ static char *guac2_fields[] = {
+ "class",
+ "login", "unix_uid", "shell", "last", "first", "middle", "status",
+ "clearid", "class", "comments", "signature", "secure",
+ "modtime", "modby", "modwith",
+ };
+
static char *guac_fields[] = {
"class",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
+ "clearid", "class", "comments", "signature", "secure",
+ "modtime", "modby", "modwith",
+ };
+
+ static char *guam2_fields[] = {
+ "clearid",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
***************
*** 133,149 ****
static char *guam_fields[] = {
"clearid",
! "login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
};
! static char *gubu_fields[] = {
"unix_uid",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
static struct validate gubu_validate =
{
VOnum0,
--- 178,200 ----
static char *guam_fields[] = {
"clearid",
! "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
"clearid", "class", "comments", "signature", "secure",
"modtime", "modby", "modwith",
};
! static char *gubu2_fields[] = {
"unix_uid",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
+ static char *gubu_fields[] = {
+ "unix_uid",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
+ "clearid", "class", "modtime", "modby", "modwith",
+ };
+
static struct validate gubu_validate =
{
VOnum0,
***************
*** 157,168 ****
followup_fix_modby,
};
! static char *gubn_fields[] = {
"first", "last",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
static struct validate gubn_validate =
{
0,
--- 208,225 ----
followup_fix_modby,
};
! static char *gubn2_fields[] = {
"first", "last",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
+ static char *gubn_fields[] = {
+ "first", "last",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
+ "clearid", "class", "modtime", "modby", "modwith",
+ };
+
static struct validate gubn_validate =
{
0,
***************
*** 176,199 ****
followup_fix_modby,
};
static char *gubc_fields[] = {
"class",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
static char *gubm_fields[] = {
"clearid",
! "login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
! static char *auac_fields[] = {
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
};
! static struct valobj auac_valobj[] = {
{V_CHAR, 0, USERS_TABLE, "login"},
{V_NUM, 1},
{V_CHAR, 2, USERS_TABLE, "shell"},
--- 233,273 ----
followup_fix_modby,
};
+ static char *gubc2_fields[] = {
+ "class",
+ "login", "unix_uid", "shell", "last", "first", "middle", "status",
+ "clearid", "class", "modtime", "modby", "modwith",
+ };
+
static char *gubc_fields[] = {
"class",
+ "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
+ "clearid", "class", "modtime", "modby", "modwith",
+ };
+
+ static char *gubm2_fields[] = {
+ "clearid",
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
static char *gubm_fields[] = {
"clearid",
! "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
"clearid", "class", "modtime", "modby", "modwith",
};
! static char *auac2_fields[] = {
"login", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
};
! static char *auac_fields[] = {
! "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
! "clearid", "class", "comments", "signature", "secure",
! };
!
! static struct valobj auac2_valobj[] = {
{V_CHAR, 0, USERS_TABLE, "login"},
{V_NUM, 1},
{V_CHAR, 2, USERS_TABLE, "shell"},
***************
*** 207,215 ****
{V_NUM, 11},
};
static struct validate auac_validate = {
auac_valobj,
! 11,
"login",
"login = '%s'",
1,
--- 281,316 ----
{V_NUM, 11},
};
+ static struct valobj auac_valobj[] = {
+ {V_CHAR, 0, USERS_TABLE, "login"},
+ {V_NUM, 1},
+ {V_CHAR, 2, USERS_TABLE, "shell"},
+ {V_CHAR, 3, USER_TABLE, "winconsoleshell"},
+ {V_CHAR, 4, USERS_TABLE, "last"},
+ {V_CHAR, 5, USERS_TABLE, "first"},
+ {V_CHAR, 6, USERS_TABLE, "middle"},
+ {V_NUM, 7},
+ {V_CHAR, 8, USERS_TABLE, "clearid"},
+ {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
+ {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
+ {V_NUM, 12},
+ };
+
+ static struct validate auac2_validate = {
+ auac2_valobj,
+ 11,
+ "login",
+ "login = '%s'",
+ 1,
+ "users_id",
+ 0,
+ setup_ausr,
+ followup_ausr,
+ };
+
static struct validate auac_validate = {
auac_valobj,
! 12,
"login",
"login = '%s'",
1,
***************
*** 219,227 ****
followup_ausr,
};
static struct validate ausr_validate = {
auac_valobj,
! 9,
"login",
"login = '%s'",
1,
--- 320,340 ----
followup_ausr,
};
+ static struct validate ausr2_validate = {
+ auac2_valobj,
+ 9,
+ "login",
+ "login = '%s'",
+ 1,
+ "users_id",
+ 0,
+ setup_ausr,
+ followup_ausr,
+ };
+
static struct validate ausr_validate = {
auac_valobj,
! 10,
"login",
"login = '%s'",
1,
***************
*** 252,264 ****
0,
};
! static char *uuac_fields[] = {
"login",
"newlogin", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
};
! static struct valobj uuac_valobj[] = {
{V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
{V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
{V_NUM, 2},
--- 365,383 ----
0,
};
! static char *uuac2_fields[] = {
"login",
"newlogin", "unix_uid", "shell", "last", "first", "middle", "status",
"clearid", "class", "comments", "signature", "secure",
};
! static char *uuac_fields[] = {
! "login",
! "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
! "clearid", "class", "comments", "signature", "secure",
! };
!
! static struct valobj uuac2_valobj[] = {
{V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
{V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
{V_NUM, 2},
***************
*** 272,281 ****
{V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
{V_NUM, 12},
};
static struct validate uuac_validate = {
uuac_valobj,
! 12,
0,
0,
0,
--- 391,428 ----
{V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
{V_NUM, 12},
};
+
+ static struct valobj uuac_valobj[] = {
+ {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
+ {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
+ {V_NUM, 2},
+ {V_CHAR, 3, USERS_TABLE, "shell"},
+ {V_CHAR, 4, USERS_TABLE, "winconsoleshell",
+ {V_CHAR, 5, USERS_TABLE, "first"},
+ {V_CHAR, 6, USERS_TABLE, "last"},
+ {V_CHAR, 7, USERS_TABLE, "middle"},
+ {V_NUM, 8},
+ {V_CHAR, 9, USERS_TABLE, "clearid"},
+ {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
+ {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
+ {V_NUM, 13},
+ };
+ static struct validate uuac2_validate = {
+ uuac2_valobj,
+ 12,
+ 0,
+ 0,
+ 0,
+ "users_id",
+ 0,
+ setup_ausr,
+ set_modtime_by_id,
+ };
+
static struct validate uuac_validate = {
uuac_valobj,
! 13,
0,
0,
0,
***************
*** 285,290 ****
--- 432,449 ----
set_modtime_by_id,
};
+ static struct validate uusr2_validate = {
+ uuac2_valobj,
+ 10,
+ 0,
+ 0,
+ 0,
+ "users_id",
+ 0,
+ setup_ausr,
+ set_modtime_by_id,
+ };
+
static struct validate uusr_validate = {
uuac_valobj,
11,
***************
*** 2535,2541 ****
struct query Queries[] = {
{
! /* Q_GALO - GET_ALL_LOGINS */
"get_all_logins",
"galo",
2,
--- 2694,2700 ----
struct query Queries[] = {
{
! /* Q_GALO - GET_ALL_LOGINS, v2.*/
"get_all_logins",
"galo",
2,
***************
*** 2543,2549 ****
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
! galo_fields,
6,
"u.users_id != 0",
0,
--- 2702,2708 ----
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
! galo2_fields,
6,
"u.users_id != 0",
0,
***************
*** 2552,2558 ****
},
{
! /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */
"get_all_active_logins",
"gaal",
2,
--- 2711,2734 ----
},
{
! /* Q_GALO - GET_ALL_LOGINS, v3.*/
! "get_all_logins",
! "galo",
! 3,
! RETRIEVE,
! "u",
! USERS_TABLE,
! "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first,
u.middle FROM users u",
! galo_fields,
! 7,
! "u.users_id != 0",
! 0,
! "u.login",
! 0,
! },
!
! {
! /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v2.*/
"get_all_active_logins",
"gaal",
2,
***************
*** 2560,2566 ****
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
! galo_fields,
6,
"u.status = 1",
0,
--- 2736,2742 ----
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
! galo2_fields,
6,
"u.status = 1",
0,
***************
*** 2569,2575 ****
},
{
! /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN */
"get_user_account_by_login",
"gual",
2,
--- 2745,2768 ----
},
{
! /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v3.*/
! "get_all_active_logins",
! "gaal",
! 3,
! RETRIEVE,
! "u",
! USERS_TABLE,
! "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first,
u.middle FROM users u",
! galo_fields,
! 7,
! "u.status = 1",
! 0,
! "u.login",
! 0,
! },
!
! {
! /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v2.*/
"get_user_account_by_login",
"gual",
2,
***************
*** 2577,2583 ****
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime,
'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
! gual_fields,
15,
"u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
1,
--- 2770,2776 ----
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime,
'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
! gual2_fields,
15,
"u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
1,
***************
*** 2586,2592 ****
},
{
! /* Q_GUAU - GET_USER_ACCOUNT_BY_UID */
"get_user_account_by_uid",
"guau",
2,
--- 2779,2802 ----
},
{
! /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v3. */
! "get_user_account_by_login",
! "gual",
! 3,
! RETRIEVE,
! "u",
! USERS_TABLE,
! "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first,
u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure,
TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users
u, strings str",
! gual_fields,
! 16,
! "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
! 1,
! "u.login",
! &gubl_validate,
! },
!
! {
! /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v2.*/
"get_user_account_by_uid",
"guau",
2,
***************
*** 2594,2600 ****
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime,
'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
! guau_fields,
15,
"u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
1,
--- 2804,2810 ----
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime,
'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
! guau2_fields,
15,
"u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
1,
***************
*** 2602,2609 ****
&gubu_validate,
},
{
! /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME */
"get_user_account_by_name",
"guan",
2,
--- 2812,2836 ----
&gubu_validate,
},
+ {
+ /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v3.*/
+ "get_user_account_by_uid",
+ "guau",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first,
u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure,
TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users
u, strings str",
+ guau_fields,
+ 16,
+ "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
+ 1,
+ "u.login",
+ &gubu_validate,
+ },
+
{
! /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v2. */
"get_user_account_by_name",
"guan",
2,
***************
*** 2611,2617 ****
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime,
'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
! guan_fields,
15,
"u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and
u.comments = str.string_id",
2,
--- 2838,2844 ----
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime,
'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
! guan2_fields,
15,
"u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and
u.comments = str.string_id",
2,
***************
*** 2619,2626 ****
&guan_validate,
},
{
! /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS */
"get_user_account_by_class",
"guac",
2,
--- 2846,2870 ----
&guan_validate,
},
+ {
+ /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v3. */
+ "get_user_account_by_name",
+ "guan",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first,
u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure,
TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users
u, strings str",
+ guan_fields,
+ 16,
+ "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and
u.comments = str.string_id",
+ 2,
+ "u.login",
+ &guan_validate,
+ },
+
{
! /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v2.*/
"get_user_account_by_class",
"guac",
2,
***************
*** 2628,2634 ****
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime,
'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
! guac_fields,
15,
"u.type = UPPER('%s') AND u.users_id != 0 AND u.comments =
str.string_id",
1,
--- 2872,2878 ----
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime,
'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
! guac2_fields,
15,
"u.type = UPPER('%s') AND u.users_id != 0 AND u.comments =
str.string_id",
1,
***************
*** 2636,2643 ****
&VDfix_modby,
},
{
! /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID */
"get_user_account_by_id",
"guai",
2,
--- 2880,2904 ----
&VDfix_modby,
},
+ {
+ /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v3.*/
+ "get_user_account_by_class",
+ "guac",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first,
u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure,
TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users
u, strings str",
+ guac_fields,
+ 16,
+ "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments =
str.string_id",
+ 1,
+ "u.login",
+ &VDfix_modby,
+ },
+
{
! /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v2.*/
"get_user_account_by_id",
"guai",
2,
***************
*** 2645,2651 ****
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime,
'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
! guam_fields,
15,
"u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments =
str.string_id",
1,
--- 2906,2912 ----
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime,
'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
! guam2_fields,
15,
"u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments =
str.string_id",
1,
***************
*** 2653,2660 ****
&VDfix_modby,
},
{
! /* Q_GUBL - GET_USER_BY_LOGIN */
"get_user_by_login",
"gubl",
2,
--- 2914,2938 ----
&VDfix_modby,
},
+ {
+ /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v3.*/
+ "get_user_account_by_id",
+ "guai",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first,
u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure,
TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users
u, strings str",
+ guam_fields,
+ 16,
+ "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments =
str.string_id",
+ 1,
+ "u.login",
+ &VDfix_modby,
+ },
+
{
! /* Q_GUBL - GET_USER_BY_LOGIN, v2.*/
"get_user_by_login",
"gubl",
2,
***************
*** 2662,2668 ****
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby,
u.modwith FROM users u",
! gubl_fields,
12,
"u.login LIKE '%s' AND u.users_id != 0",
1,
--- 2940,2946 ----
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby,
u.modwith FROM users u",
! gubl2_fields,
12,
"u.login LIKE '%s' AND u.users_id != 0",
1,
***************
*** 2670,2677 ****
&gubl_validate,
},
{
! /* Q_GUBU - GET_USER_BY_UID */
"get_user_by_uid",
"gubu",
2,
--- 2948,2972 ----
&gubl_validate,
},
+ {
+ /* Q_GUBL - GET_USER_BY_LOGIN, v3.*/
+ "get_user_by_login",
+ "gubl",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first,
u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY
HH24:MI:SS'), u.modby, u.modwith FROM users u",
+ gubl_fields,
+ 13,
+ "u.login LIKE '%s' AND u.users_id != 0",
+ 1,
+ "u.login",
+ &gubl_validate,
+ },
+
{
! /* Q_GUBU - GET_USER_BY_UID, v2.*/
"get_user_by_uid",
"gubu",
2,
***************
*** 2679,2685 ****
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby,
u.modwith FROM users u",
! gubu_fields,
12,
"u.unix_uid = %s AND u.users_id != 0",
1,
--- 2974,2980 ----
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby,
u.modwith FROM users u",
! gubu2_fields,
12,
"u.unix_uid = %s AND u.users_id != 0",
1,
***************
*** 2688,2694 ****
},
{
! /* Q_GUBN - GET_USER_BY_NAME */
"get_user_by_name",
"gubn",
2,
--- 2983,3006 ----
},
{
! /* Q_GUBU - GET_USER_BY_UID, v3.*/
! "get_user_by_uid",
! "gubu",
! 3,
! RETRIEVE,
! "u",
! USERS_TABLE,
! "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first,
u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY
HH24:MI:SS'), u.modby, u.modwith FROM users u",
! gubu_fields,
! 13,
! "u.unix_uid = %s AND u.users_id != 0",
! 1,
! "u.login",
! &gubu_validate,
! },
!
! {
! /* Q_GUBN - GET_USER_BY_NAME, v2.*/
"get_user_by_name",
"gubn",
2,
***************
*** 2696,2702 ****
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby,
u.modwith FROM users u",
! gubn_fields,
12,
"u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
2,
--- 3008,3014 ----
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby,
u.modwith FROM users u",
! gubn2_fields,
12,
"u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
2,
***************
*** 2705,2711 ****
},
{
! /* Q_GUBC - GET_USER_BY_CLASS */
"get_user_by_class",
"gubc",
2,
--- 3017,3040 ----
},
{
! /* Q_GUBN - GET_USER_BY_NAME, v3.*/
! "get_user_by_name",
! "gubn",
! 3,
! RETRIEVE,
! "u",
! USERS_TABLE,
! "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first,
u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY
HH24:MI:SS'), u.modby, u.modwith FROM users u",
! gubn_fields,
! 13,
! "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
! 2,
! "u.login",
! &gubn_validate,
! },
!
! {
! /* Q_GUBC - GET_USER_BY_CLASS, v2.*/
"get_user_by_class",
"gubc",
2,
***************
*** 2713,2719 ****
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby,
u.modwith FROM users u",
! gubc_fields,
12,
"u.type = UPPER('%s') AND u.users_id != 0",
1,
--- 3042,3048 ----
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby,
u.modwith FROM users u",
! gubc2_fields,
12,
"u.type = UPPER('%s') AND u.users_id != 0",
1,
***************
*** 2721,2728 ****
&VDfix_modby,
},
{
! /* Q_GUBM - GET_USER_BY_MITID */
"get_user_by_mitid",
"gubm",
2,
--- 3050,3074 ----
&VDfix_modby,
},
+ {
+ /* Q_GUBC - GET_USER_BY_CLASS, v3.*/
+ "get_user_by_class",
+ "gubc",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first,
u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY
HH24:MI:SS'), u.modby, u.modwith FROM users u",
+ gubc_fields,
+ 13,
+ "u.type = UPPER('%s') AND u.users_id != 0",
+ 1,
+ "u.login",
+ &VDfix_modby,
+ },
+
{
! /* Q_GUBM - GET_USER_BY_MITID, v2.*/
"get_user_by_mitid",
"gubm",
2,
***************
*** 2730,2736 ****
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby,
u.modwith FROM users u",
! gubm_fields,
12,
"u.clearid LIKE '%s' AND u.users_id != 0",
1,
--- 3076,3082 ----
"u",
USERS_TABLE,
"u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status,
u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby,
u.modwith FROM users u",
! gubm2_fields,
12,
"u.clearid LIKE '%s' AND u.users_id != 0",
1,
***************
*** 2738,2745 ****
&VDfix_modby,
},
{
! /* Q_AUAC - ADD_USER_ACCOUNT */ /* uses prefetch_value() for
users_id */
"add_user_account",
"auac",
2,
--- 3084,3108 ----
&VDfix_modby,
},
+ {
+ /* Q_GUBM - GET_USER_BY_MITID, v3.*/
+ "get_user_by_mitid",
+ "gubm",
+ 3,
+ RETRIEVE,
+ "u",
+ USERS_TABLE,
+ "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first,
u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY
HH24:MI:SS'), u.modby, u.modwith FROM users u",
+ gubm_fields,
+ 13,
+ "u.clearid LIKE '%s' AND u.users_id != 0",
+ 1,
+ "u.login",
+ &VDfix_modby,
+ },
+
{
! /* Q_AUAC - ADD_USER_ACCOUNT, v2.*/ /* uses prefetch_value() for
users_id */
"add_user_account",
"auac",
2,
***************
*** 2750,2765 ****
* but using up one argv element.
*/
"INTO users (login, unix_uid, shell, last, first, middle, status,
clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s,
'%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s,
NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s)",
! auac_fields,
12,
NULL,
0,
NULL,
&auac_validate,
},
{
! /* Q_AUSR - ADD_USER */ /* uses prefetch_value() for users_id */
"add_user",
"ausr",
2,
--- 3113,3148 ----
* but using up one argv element.
*/
"INTO users (login, unix_uid, shell, last, first, middle, status,
clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s,
'%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s,
NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s)",
! auac2_fields,
12,
NULL,
0,
NULL,
+ &auac2_validate,
+ },
+
+ {
+ /* Q_AUAC - ADD_USER_ACCOUNT, v3.*/ /* uses prefetch_value() for
users_id */
+ "add_user_account",
+ "auac",
+ 3,
+ APPEND,
+ "u",
+ USERS_TABLE,
+ /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
+ * but using up one argv element.
+ */
+ "INTO users (login, unix_uid, shell, winconsoleshell, last, first,
middle, status, clearid, type, comments, signature, secure, users_id)
VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s',
CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s)",
+ auac_fields,
+ 13,
+ NULL,
+ 0,
+ NULL,
&auac_validate,
},
{
! /* Q_AUSR - ADD_USER, v2.*/ /* uses prefetch_value() for users_id */
"add_user",
"ausr",
2,
***************
*** 2767,2777 ****
"u",
USERS_TABLE,
"INTO users (login, unix_uid, shell, last, first, middle, status,
clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s,
'%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s,
NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, %s)",
! auac_fields,
9,
0,
0,
NULL,
&ausr_validate,
},
--- 3150,3177 ----
"u",
USERS_TABLE,
"INTO users (login, unix_uid, shell, last, first, middle, status,
clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s,
'%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s,
NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, %s)",
! auac2_fields,
9,
0,
0,
NULL,
+ &ausr2_validate,
+ },
+
+ {
+ /* Q_AUSR - ADD_USER, v3.*/ /* uses prefetch_value() for users_id */
+ "add_user",
+ "ausr",
+ 3,
+ APPEND,
+ "u",
+ USERS_TABLE,
+ "INTO users (login, unix_uid, shell, winconsoleshell, last, first,
middle, status, clearid, type, comments, signature, secure, users_id)
VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s',
CHR(0)), %s, NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, %s)",
+ auac_fields,
+ 10,
+ 0,
+ 0,
+ NULL,
&ausr_validate,
},
***************
*** 2793,2799 ****
},
{
! /* Q_UUAC - UPDATE_USER_ACCOUNT */
"update_user_account",
"uuac",
2,
--- 3193,3199 ----
},
{
! /* Q_UUAC - UPDATE_USER_ACCOUNT, v2.*/
"update_user_account",
"uuac",
2,
***************
*** 2802,2817 ****
USERS_TABLE,
/* See comment in auac about signature. */
"users SET login = '%s', unix_uid = %s, shell = '%s', last =
NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)),
status = %s, clearid = NVL('%s', CHR(0)), type = '%s', comments = %d,
signature = NVL(CHR(0), '%s'), secure = %s",
! uuac_fields,
12,
"users_id = %d",
1,
NULL,
&uuac_validate,
},
{
! /* Q_UUSR - UPDATE_USER */
"update_user",
"uusr",
2,
--- 3202,3235 ----
USERS_TABLE,
/* See comment in auac about signature. */
"users SET login = '%s', unix_uid = %s, shell = '%s', last =
NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)),
status = %s, clearid = NVL('%s', CHR(0)), type = '%s', comments = %d,
signature = NVL(CHR(0), '%s'), secure = %s",
! uuac2_fields,
12,
"users_id = %d",
1,
NULL,
+ &uuac2_validate,
+ },
+
+ {
+ /* Q_UUAC - UPDATE_USER_ACCOUNT, v3.*/
+ "update_user_account",
+ "uuac",
+ 3,
+ UPDATE,
+ "u",
+ USERS_TABLE,
+ /* See comment in auac about signature. */
+ "users SET login = '%s', unix_uid = %s, shell = '%s', winconsoleshell
= '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle =
NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s',
comments = %d, signature = NVL(CHR(0), '%s'), secure = %s",
+ uuac_fields,
+ 13,
+ "users_id = %d",
+ 1,
+ NULL,
&uuac_validate,
},
{
! /* Q_UUSR - UPDATE_USER, v2.*/
"update_user",
"uusr",
2,
***************
*** 2819,2826 ****
"u",
USERS_TABLE,
"users SET login = '%s', unix_uid = %s, shell = '%s', last =
NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)),
status = %s, clearid = NVL('%s', CHR(0)), type = '%s'",
! uuac_fields,
9,
"users_id = %d",
1,
NULL,
--- 3237,3261 ----
"u",
USERS_TABLE,
"users SET login = '%s', unix_uid = %s, shell = '%s', last =
NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)),
status = %s, clearid = NVL('%s', CHR(0)), type = '%s'",
! uuac2_fields,
9,
+ "users_id = %d",
+ 1,
+ NULL,
+ &uusr2_validate,
+ },
+
+ {
+ /* Q_UUSR - UPDATE_USER, v3.*/
+ "update_user",
+ "uusr",
+ 3,
+ UPDATE,
+ "u",
+ USERS_TABLE,
+ "users SET login = '%s', unix_uid = %s, shell = '%s', winconsoleshell
= '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle =
NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s'",
+ uuac_fields,
+ 10,
"users_id = %d",
1,
NULL,