[1894] in Moira Commits

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

/svn/moira r4034 - trunk/moira/gen

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Tue Mar 15 12:34:29 2011

Date: Tue, 15 Mar 2011 12:34:23 -0400
From: Garry Zacheiss <zacheiss@MIT.EDU>
Message-Id: <201103151634.p2FGYNaN014431@drugstore.mit.edu>
To: moira-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: zacheiss
Date: 2011-03-15 12:34:23 -0400 (Tue, 15 Mar 2011)
New Revision: 4034

Modified:
   trunk/moira/gen/acl.pc
   trunk/moira/gen/hesiod.pc
Log:
No longer output nickname field.

Modified: trunk/moira/gen/acl.pc
===================================================================
--- trunk/moira/gen/acl.pc	2011-03-15 16:33:20 UTC (rev 4033)
+++ trunk/moira/gen/acl.pc	2011-03-15 16:34:23 UTC (rev 4034)
@@ -266,7 +266,7 @@
   struct imember *m;
   EXEC SQL BEGIN DECLARE SECTION;
   char shell[USERS_SHELL_SIZE], fullname[USERS_FULLNAME_SIZE];
-  char nickname[USERS_NICKNAME_SIZE], oa[USERS_OFFICE_ADDR_SIZE];
+  char oa[USERS_OFFICE_ADDR_SIZE];
   char op[USERS_OFFICE_PHONE_SIZE], hp[USERS_HOME_PHONE_SIZE];
   int uid, i = 0;
   char *name, *n, *lasts = NULL;
@@ -279,9 +279,9 @@
 	case 'U':
 	  name = m->name;
 
-	  EXEC SQL SELECT unix_uid, shell, fullname, nickname,
+	  EXEC SQL SELECT unix_uid, shell, fullname,
 	    office_addr, office_phone, home_phone
-	    INTO :uid, :shell, :fullname, :nickname, :oa, :op, :hp
+	    INTO :uid, :shell, :fullname, :oa, :op, :hp
 	    FROM users
 	    WHERE login = :name AND status != 3;
 	  if (sqlca.sqlcode)
@@ -289,13 +289,12 @@
 
 	  strtrim(shell);
 	  strtrim(fullname);
-	  strtrim(nickname);
 	  strtrim(op);
 	  strtrim(oa);
 	  strtrim(hp);
 
-	  fprintf(out, "%s:*:%d:101:%s,%s,%s,%s,%s:/mit/%s:%s\n",
-		  name, uid, fullname, nickname, oa, op, hp, name, shell);
+	  fprintf(out, "%s:*:%d:101:%s,%s,%s,%s:/mit/%s:%s\n",
+		  name, uid, fullname, oa, op, hp, name, shell);
 	  break;
 
 	case 'K':
@@ -305,9 +304,9 @@
 	    login = :name and status != 3;
 	  if (i == 1)
 	    {
-	      EXEC SQL SELECT unix_uid, shell, fullname, nickname,
+	      EXEC SQL SELECT unix_uid, shell, fullname,
 		office_addr, office_phone, home_phone 
-		INTO :uid, :shell, :fullname, :nickname, :oa, :op, :hp 
+		INTO :uid, :shell, :fullname, :oa, :op, :hp 
 		FROM users 
 		WHERE login = :name AND status != 3;	      
 	      if (sqlca.sqlcode)
@@ -315,13 +314,12 @@
 	      
 	      strtrim(shell);
 	      strtrim(fullname);
-	      strtrim(nickname);
 	      strtrim(op);
 	      strtrim(oa);
 	      strtrim(hp);
 	      
-	      fprintf(out, "%s:*:%d:101:%s,%s,%s,%s,%s:/mit/%s:%s\n",
-		      name, uid, fullname, nickname, oa, op, hp, name, shell);
+	      fprintf(out, "%s:*:%d:101:%s,%s,%s,%s:/mit/%s:%s\n",
+		      name, uid, fullname, oa, op, hp, name, shell);
 	    }
 	  break;
 	}

Modified: trunk/moira/gen/hesiod.pc
===================================================================
--- trunk/moira/gen/hesiod.pc	2011-03-15 16:33:20 UTC (rev 4033)
+++ trunk/moira/gen/hesiod.pc	2011-03-15 16:34:23 UTC (rev 4034)
@@ -203,7 +203,7 @@
   char login[USERS_LOGIN_SIZE], shell[USERS_SHELL_SIZE];
   char fullname[USERS_FULLNAME_SIZE], oa[USERS_OFFICE_ADDR_SIZE];
   char op[USERS_OFFICE_PHONE_SIZE], hp[USERS_HOME_PHONE_SIZE];
-  char nn[USERS_NICKNAME_SIZE], potype[USERS_POTYPE_SIZE];
+  char potype[USERS_POTYPE_SIZE];
   int uid, id, pid, iid, eid, mid, status;
   EXEC SQL END DECLARE SECTION;
 
@@ -238,7 +238,7 @@
 
   users = create_hash(12001);
   EXEC SQL DECLARE u_cursor CURSOR FOR
-    SELECT login, unix_uid, shell, fullname, nickname, office_addr,
+    SELECT login, unix_uid, shell, fullname, office_addr,
     office_phone, home_phone, users_id, potype, pop_id, imap_id, exchange_id,
     status
     FROM users
@@ -247,13 +247,12 @@
   EXEC SQL OPEN u_cursor;
   while (1)
     {
-      EXEC SQL FETCH u_cursor INTO :login, :uid, :shell, :fullname, :nn,
+      EXEC SQL FETCH u_cursor INTO :login, :uid, :shell, :fullname,
 	:oa, :op, :hp, :id, :potype, :pid, :iid, :eid, :status;
       if (sqlca.sqlcode)
 	break;
       strtrim(login);
       dequote(fullname);
-      dequote(nn);
       dequote(oa);
       dequote(op);
       dequote(hp);
@@ -265,8 +264,8 @@
       hash_store(users, id, u);
       if (status == 1 || status == 2)
 	{
-	  fprintf(pout, "%s.passwd\t%s %s \"%s:*:%d:101:%s,%s,%s,%s,%s:/mit/%s:%s\"\n",
-		  login, HCLASS, HTYPE, login, uid, fullname, nn, oa,
+	  fprintf(pout, "%s.passwd\t%s %s \"%s:*:%d:101:%s,%s,%s,%s:/mit/%s:%s\"\n",
+		  login, HCLASS, HTYPE, login, uid, fullname, oa,
 		  op, hp, login, shell);
 	  fprintf(uout, "%d.uid\t%s CNAME %s.passwd\n", uid, HCLASS, login);
 	}


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