[1536] in Moira

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

add uuws (update_user_windows_shell) query

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Sat Apr 22 14:07:03 2000

Message-Id: <200004221806.OAA01208@riff-raff.mit.edu>
To: moiradev@MIT.EDU
Date: Sat, 22 Apr 2000 14:06:57 -0400
From: Garry Zacheiss <zacheiss@MIT.EDU>

	It would be nice to let users update their own windows shell
(the current implementation would require user-admin).  This is
completely analagous to uush.

Index: queries2.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/server/queries2.c,v
retrieving revision 2.71
diff -c -r2.71 queries2.c
*** queries2.c	2000/04/21 19:47:40	2.71
--- queries2.c	2000/04/22 17:55:09
***************
*** 478,483 ****
--- 478,505 ----
    set_finger_modtime,
  };
  
+ static char *uuws_fields[] = {
+   "login",
+   "winconsoleshell",
+ };
+ 
+ static struct valobj uuws_valobj[] = {
+   {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
+   {V_CHAR, 1, USERS_TABLE, "winconsoleshell"},
+ };
+ 
+ static struct validate uuws_validate = {
+   uuws_valobj,
+   2,
+   0,
+   0,
+   0,
+   "users_id",
+   access_user,
+   0,
+   set_finger_modtime,
+ };
+ 
  static char *uust_fields[] = {
    "login",
    "status",
***************
*** 3348,3353 ****
--- 3370,3392 ----
      1,
      NULL,
      &uush_validate,
+   },
+ 
+   {
+     /* Q_UUWS - UPDATE_USER_WINDOWS_SHELL */
+     "update_user_windows_shell",
+     "uuws",
+     2,
+     UPDATE,
+     "u",
+     USERS_TABLE,
+     "users SET winconsoleshell = '%s'",
+     uuws_fields,
+     1,
+     "users_id = %d",
+     1,
+     NULL,
+     &uuws_validate,
    },
  
    {

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