[1697] in Moira

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

Re: more sidhistory changes

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Fri Nov 10 20:52:34 2000

Message-Id: <200011110152.UAA01372@riff-raff-w20.mit.edu>
To: Qing Dong <dongq@MIT.EDU>
cc: moiradev@MIT.EDU
In-Reply-To: Your message of "Thu, 09 Nov 2000 17:23:00 EST."
             <200011092221.RAA12654@melbourne-city-street.MIT.EDU> 
Date: Fri, 10 Nov 2000 20:52:22 -0500
From: Garry Zacheiss <zacheiss@MIT.EDU>

	Hi,

	This looks pretty food.  I made two small changes; I had the
help text refer to the second arg to gusl and glsn as "domain_sid"
instead of "sid", because it looked confusing to have something that
took (login, sid) and returned (login, sid, created).

	I also tweaked the query structure for gusl and glsn to account
for the fact that they were both now taking 2 args.

	Let me know if this looks ok to you.

Garry

Index: queries2.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/server/queries2.c,v
retrieving revision 2.80
diff -c -r2.80 queries2.c
*** queries2.c	2000/11/01 22:34:20	2.80
--- queries2.c	2000/11/11 01:44:14
***************
*** 2946,2952 ****
  };
  
  static char *gusl_fields[] = {
!   "login",
    "login", "sid", "created",
  };
  
--- 2946,2952 ----
  };
  
  static char *gusl_fields[] = {
!   "login", "domain_sid", 
    "login", "sid", "created",
  };
  
***************
*** 2964,2970 ****
  };
  
  static char *glsn_fields[] = {
!   "name",
    "name", "sid", "created",
  };
  
--- 2964,2970 ----
  };
  
  static char *glsn_fields[] = {
!   "name", "domain_sid",
    "name", "sid", "created",
  };
  
***************
*** 3015,3020 ****
--- 3015,3024 ----
    0,
  };
  
+ static char *gdds_fields[] = {
+   "sid",
+ };
+ 
  
  /* Generalized Query Definitions */
  
***************
*** 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,
    },
  
--- 6195,6203 ----
      "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'",
!     2,
!     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,
    },
  
--- 6229,6237 ----
      "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'",
!     2,
!     NULL,
      &glsn_validate,
    },
  
***************
*** 6246,6251 ****
--- 6250,6272 ----
      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