[1696] in Moira

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

more sidhistory changes

daemon@ATHENA.MIT.EDU (Qing Dong)
Thu Nov 9 17:21:21 2000

Message-Id: <200011092221.RAA12654@melbourne-city-street.MIT.EDU>
Date: Thu, 09 Nov 2000 17:23:00 -0500
To: moiradev@mit.edu
From: Qing Dong <dongq@MIT.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

The pismere team would like to make a little more changes to 
sidhistory in moira in order to facilitate the domain recovery. 

We want to add one query:
get_distinct_domain_sids
args: none
returns: {sid}
acl: dbadmin
desciption: get the distinctive domain sids in the user sids. A user sid is
consisted
	        of the domain sid + rid (last 8 bytes in our case)

We want to modify two of the existing get queries:
get_user_sids_by_login 
args: login, domain_sid 
returns: {users_id, sid, created} 
acl: dbadmin 
validate: users_id existing in users table

get_list_sids_by_name 
args: name, domain_sid
returns: {list_id, sid, created} 
acl: adadmin
validate: list_id existing in list table

Thanks. 

Qing

Index: queries2.c
==========================================
=========================
RCS file:
\\dongq-afs\all\athena.mit.edu\astaff\project\moiradev\repository/moira/serv
er/queries2.c,v
retrieving revision 2.79
diff -c -r2.79 queries2.c
*** queries2.c	2000/10/25 20:38:43	2.79
--- queries2.c	2000/11/09 22:07:00
***************
*** 2946,2952 ****
  };
  
  static char *gusl_fields[] = {
!   "login",
    "login", "sid", "created",
  };
  
--- 2946,2952 ----
  };
  
  static char *gusl_fields[] = {
!   "login", "sid",
    "login", "sid", "created",
  };
  
***************
*** 2964,2970 ****
  };
  
  static char *glsn_fields[] = {
!   "name",
    "name", "sid", "created",
  };
  
--- 2964,2970 ----
  };
  
  static char *glsn_fields[] = {
!   "name", "sid",
    "name", "sid", "created",
  };
  
***************
*** 3014,3021 ****
    0,
    0,
  };
  
- 
  /* Generalized Query Definitions */
  
  /* Multiple versions of the same query MUST be listed in ascending
--- 3014,3024 ----
    0,
    0,
  };
+ 
+ static char *gdds_fields[] = {
+   "sid",
+ };
  
  /* Generalized Query Definitions */
  
  /* Multiple versions of the same query MUST be listed in ascending
***************
*** 6191,6199 ****
      "u.login, us.sid, TO_CHAR(us.created, 'YYYY-MM-DD HH24:MI:SS') FROM
users u, usersids us",
      gusl_fields,
      3,
!     "us.users_id = %d AND u.users_id = us.users_id",
      1,
!     "us.created",
      &gusl_validate,
    },
  
--- 6194,6202 ----
      "u.login, us.sid, TO_CHAR(us.created, 'YYYY-MM-DD HH24:MI:SS') FROM
users u, usersids us",
      gusl_fields,
      3,
!     "us.users_id = %d AND u.users_id = us.users_id AND substr(us.sid, 1,
length(us.sid)-8) = %s",
      1,
!     NULL,
      &gusl_validate,
    },
  
***************
*** 6225,6233 ****
      "l.name, ls.sid, TO_CHAR(ls.created, 'YYYY-MM-DD HH24:MI:SS') FROM
list l, listsids ls",
      glsn_fields,
      3,
!     "ls.list_id = %d AND l.list_id = ls.list_id",
      1,
!     "created",
      &glsn_validate,
    },
  
--- 6228,6236 ----
      "l.name, ls.sid, TO_CHAR(ls.created, 'YYYY-MM-DD HH24:MI:SS') FROM
list l, listsids ls",
      glsn_fields,
      3,
!     "ls.list_id = %d AND l.list_id = ls.list_id AND substr(ls.sid, 1,
length(ls.sid)-8) = %s",
      1,
!     NULL,
      &glsn_validate,
    },
  
***************
*** 6246,6251 ****
--- 6249,6271 ----
      0,
      NULL,
      &alsn_validate,
+   },
+ 
+   {
+     /* Q_GDDS - GET_DISTINCT_DOMAIN_SIDS, v4 */
+     "get_distinct_domain_sids",
+     "gdds",
+     4,
+     RETRIEVE,
+     "s",
+     USERSIDS_TABLE,
+     "distinct substr(sid, 1, length(sid)-8) FROM usersids",
+     gdds_fields,
+     1,
+     NULL,
+     0,
+     NULL,
+     NULL,
    },
  
  };



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