[1524] in Moira

home help back first fref pref prev next nref lref last post

proposed changes for adding a new field to User table

daemon@ATHENA.MIT.EDU (Qing Dong)
Wed Apr 12 16:55:50 2000

Message-Id: <200004122055.QAA02087@melbourne-city-street.MIT.EDU>
Date: Wed, 12 Apr 2000 16:55:46 -0400
To: moiradev@mit.edu
From: Qing Dong <dongq@MIT.EDU>
Cc: pbh@mit.edu, dalmeida@mit.edu
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

The pismere team wants to add a new column to User table. It is
used to record the user's preference for his/her windows console 
shell (bash, cmd prompt, etc.). Paul told me that he already talked to 
some people in the moira development team about it. The following are 
proposed changes to the moira client programs (addusr, moira) and
server files for this new field. We are also thinking about making changes to
the current chsh program or create a similar new program to allow the users
to make changes to their windows shells easily. 

I tentatively call this new field "winconsoleshell". I will change it if
somebody 
has a better name for it. My understanding of moira server files is very
limited, 
so I am sure that there are plenty of errors or omissions in the proposed 
changes. I will appreciate it if you can take a careful look at it. 

Thanks. 

Qing

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/11 16:41:49
***************
*** 46,52 ****
--- 46,54 ----
  #endif
  #define DEFAULT_CLASS "?"
  
+ #define DEFAULT_WINCONSOLESHELL "cmd"
  
+ 
  /*	Function Name: UserState
   *	Description: Convert a numeric state into a descriptive string.
   *	Arguments: state value
***************
*** 109,114 ****
--- 111,119 ----
    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 ****
--- 142,148 ----
    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 ****
--- 258,267 ----
  
    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/11 14:27:46
***************
*** 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/11 15:04:13
***************
*** 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[4] - last name
!  **	argv[5] - first name
!  **	argv[6] - 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[5]) && strlen(argv[6]))
!     sprintf(fullname, "%s %s %s", argv[5], argv[6], argv[4]);
!   else if (strlen(argv[5]))
!     sprintf(fullname, "%s %s", argv[5], argv[4]);
    else
!     sprintf(fullname, "%s", argv[4]);
  
    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/11 19:40:14
***************
*** 68,86 ****
  /* 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",
  };
  
--- 68,86 ----
  /* Query data */
  
  static char *galo_fields[] = {
!   "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle",
  };
  
  static char *gual_fields[] = {
    "login",
!   "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
    "clearid", "class", "comments", "signature", "secure",
    "modtime", "modby", "modwith",
  };
  
  static char *gubl_fields[] = {
    "login",
!   "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
    "clearid", "class", "modtime", "modby", "modwith",
  };
  
***************
*** 99,112 ****
  
  static char *guau_fields[] = {
    "unix_uid",
!   "login", "unix_uid", "shell", "last", "first", "middle", "status",
    "clearid", "class", "comments", "signature", "secure",
    "modtime", "modby", "modwith",
  };
  
  static char *guan_fields[] = {
    "first", "last",
!   "login", "unix_uid", "shell", "last", "first", "middle", "status",
    "clearid", "class", "comments", "signature", "secure",
    "modtime", "modby", "modwith",
  };
--- 99,112 ----
  
  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 *guan_fields[] = {
    "first", "last",
!   "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
    "clearid", "class", "comments", "signature", "secure",
    "modtime", "modby", "modwith",
  };
***************
*** 126,146 ****
  
  static char *guac_fields[] = {
    "class",
!   "login", "unix_uid", "shell", "last", "first", "middle", "status",
    "clearid", "class", "comments", "signature", "secure",
    "modtime", "modby", "modwith",
  };
  
  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",
  };
  
--- 126,146 ----
  
  static char *guac_fields[] = {
    "class",
!   "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
    "clearid", "class", "comments", "signature", "secure",
    "modtime", "modby", "modwith",
  };
  
  static char *guam_fields[] = {
    "clearid",
!   "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
    "clearid", "class", "comments", "signature", "secure",
    "modtime", "modby", "modwith",
  };
  
  static char *gubu_fields[] = {
    "unix_uid",
!   "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
    "clearid", "class", "modtime", "modby", "modwith",
  };
  
***************
*** 159,165 ****
  
  static char *gubn_fields[] = {
    "first", "last",
!   "login", "unix_uid", "shell", "last", "first", "middle", "status",
    "clearid", "class", "modtime", "modby", "modwith",
  };
  
--- 159,165 ----
  
  static char *gubn_fields[] = {
    "first", "last",
!   "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
    "clearid", "class", "modtime", "modby", "modwith",
  };
  
***************
*** 178,195 ****
  
  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",
  };
  
--- 178,195 ----
  
  static char *gubc_fields[] = {
    "class",
!   "login", "unix_uid", "shell", "winconsoleshell", "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 *auac_fields[] = {
!   "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
    "clearid", "class", "comments", "signature", "secure",
  };
  
***************
*** 197,215 ****
    {V_CHAR, 0, USERS_TABLE, "login"},
    {V_NUM, 1},
    {V_CHAR, 2, USERS_TABLE, "shell"},
!   {V_CHAR, 3, USERS_TABLE, "last"},
!   {V_CHAR, 4, USERS_TABLE, "first"},
!   {V_CHAR, 5, USERS_TABLE, "middle"},
!   {V_NUM, 6},
!   {V_CHAR, 7, USERS_TABLE, "clearid"},
!   {V_TYPE, 8, 0, "class", 0, MR_BAD_CLASS},
!   {V_ID, 9, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
!   {V_NUM, 11},
  };
  
  static struct validate auac_validate = {
    auac_valobj,
!   11,
    "login",
    "login = '%s'",
    1,
--- 197,216 ----
    {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 auac_validate = {
    auac_valobj,
!   12,
    "login",
    "login = '%s'",
    1,
***************
*** 221,227 ****
  
  static struct validate ausr_validate = {
    auac_valobj,
!   9,
    "login",
    "login = '%s'",
    1,
--- 222,228 ----
  
  static struct validate ausr_validate = {
    auac_valobj,
!   10,
    "login",
    "login = '%s'",
    1,
***************
*** 254,260 ****
  
  static char *uuac_fields[] = {
    "login",
!   "newlogin", "unix_uid", "shell", "last", "first", "middle", "status",
    "clearid", "class", "comments", "signature", "secure",
  };
  
--- 255,261 ----
  
  static char *uuac_fields[] = {
    "login",
!   "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
"middle", "status",
    "clearid", "class", "comments", "signature", "secure",
  };
  
***************
*** 263,281 ****
    {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, "first"},
!   {V_CHAR, 5, USERS_TABLE, "last"},
!   {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 uuac_validate = {
    uuac_valobj,
!   12,
    0,
    0,
    0,
--- 264,283 ----
    {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 uuac_validate = {
    uuac_valobj,
!   13,
    0,
    0,
    0,
***************
*** 2535,2541 ****
  
  struct query Queries[] = {
    {
!     /* Q_GALO - GET_ALL_LOGINS */
      "get_all_logins",
      "galo",
      2,
--- 2537,2543 ----
  
  struct query Queries[] = {
    {
!     /* Q_GALO - GET_ALL_LOGINS v2*/
      "get_all_logins",
      "galo",
      2,
***************
*** 2552,2558 ****
    },
  
    {
!     /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */
      "get_all_active_logins",
      "gaal",
      2,
--- 2554,2577 ----
    },
  
    {
!     /* 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,
***************
*** 2569,2575 ****
    },
  
    {
!     /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN */
      "get_user_account_by_login",
      "gual",
      2,
--- 2588,2611 ----
    },
  
    {
!     /* 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,
***************
*** 2586,2592 ****
    },
  
    {
!     /* Q_GUAU - GET_USER_ACCOUNT_BY_UID */
      "get_user_account_by_uid",
      "guau",
      2,
--- 2622,2645 ----
    },
  
    {
!     /* 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,
***************
*** 2602,2609 ****
      &gubu_validate,
    },
  
    {
!     /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME */
      "get_user_account_by_name",
      "guan",
      2,
--- 2655,2679 ----
      &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,
***************
*** 2620,2626 ****
    },
  
    {
!     /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS */
      "get_user_account_by_class",
      "guac",
      2,
--- 2690,2713 ----
    },
  
    {
!     /* 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,
***************
*** 2636,2643 ****
      &VDfix_modby,
    },
  
    {
!     /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID */
      "get_user_account_by_id",
      "guai",
      2,
--- 2723,2747 ----
      &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,
***************
*** 2654,2660 ****
    },
  
    {
!     /* Q_GUBL - GET_USER_BY_LOGIN */
      "get_user_by_login",
      "gubl",
      2,
--- 2758,2781 ----
    },
  
    {
!     /* 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,
***************
*** 2671,2677 ****
    },
  
    {
!     /* Q_GUBU - GET_USER_BY_UID */
      "get_user_by_uid",
      "gubu",
      2,
--- 2792,2815 ----
    },
  
    {
!     /* 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,
***************
*** 2688,2694 ****
    },
  
    {
!     /* Q_GUBN - GET_USER_BY_NAME */
      "get_user_by_name",
      "gubn",
      2,
--- 2826,2849 ----
    },
  
    {
!     /* 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,
***************
*** 2704,2711 ****
      &gubn_validate,
    },
  
    {
!     /* Q_GUBC - GET_USER_BY_CLASS */
      "get_user_by_class",
      "gubc",
      2,
--- 2859,2883 ----
      &gubn_validate,
    },
  
+   {
+     /* 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,
***************
*** 2722,2728 ****
    },
  
    {
!     /* Q_GUBM - GET_USER_BY_MITID */
      "get_user_by_mitid",
      "gubm",
      2,
--- 2894,2917 ----
    },
  
    {
!     /* 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,
***************
*** 2738,2745 ****
      &VDfix_modby,
    },
  
    {
!     /* Q_AUAC - ADD_USER_ACCOUNT */  /* uses prefetch_value() for
users_id */
      "add_user_account",
      "auac",
      2,
--- 2927,2951 ----
      &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,
***************
*** 2759,2765 ****
    },
  
    {
!     /* Q_AUSR - ADD_USER */  /* uses prefetch_value() for users_id */
      "add_user",
      "ausr",
      2,
--- 2965,2991 ----
    },
  
    {
!     /* 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,
***************
*** 2776,2781 ****
--- 3002,3024 ----
    },
  
    {
+     /* 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,
+   },
+ 
+   {
      /* Q_RUSR - REGISTER_USER */
      "register_user",
      "rusr",
***************
*** 2793,2799 ****
    },
  
    {
!     /* Q_UUAC - UPDATE_USER_ACCOUNT */
      "update_user_account",
      "uuac",
      2,
--- 3036,3042 ----
    },
  
    {
!     /* Q_UUAC - UPDATE_USER_ACCOUNT v2*/
      "update_user_account",
      "uuac",
      2,
***************
*** 2811,2817 ****
    },
  
    {
!     /* Q_UUSR - UPDATE_USER */
      "update_user",
      "uusr",
      2,
--- 3054,3078 ----
    },
  
    {
!     /* 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,
***************
*** 2821,2826 ****
--- 3082,3104 ----
      "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,
+     &uusr_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,
 


home help back first fref pref prev next nref lref last post