[26398] in Source-Commits

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

Re: /svn/athena r25547 - in trunk/third/moira: clients/moira debian

daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Sat Jun 2 16:32:05 2012

Date: Sat, 2 Jun 2012 16:32:02 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201206011601.q51G1Z11002603@drugstore.mit.edu>
Message-ID: <alpine.GSO.1.10.1206021631570.18441@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

ACK.
-Ben

On Fri, 1 Jun 2012, Jonathan D Reed wrote:

> Author: jdreed
> Date: 2012-06-01 12:01:35 -0400 (Fri, 01 Jun 2012)
> New Revision: 25547
>
> Removed:
>   trunk/third/moira/man/userreg.1
> Modified:
>   trunk/third/moira/clients/moira/attach.c
>   trunk/third/moira/debian/changelog
>   trunk/third/moira/gen/hesiod.pc
>   trunk/third/moira/incremental/afs/afs.c
>   trunk/third/moira/incremental/afs/afs_create.pl
>   trunk/third/moira/incremental/afs/afs_utils.pl
>   trunk/third/moira/man/Makefile.in
> Log:
> In moira:
>  * Re-snapshot moira at r4081, to pick up client changes for lockers of
>    type 'SITE'
>
>
> Modified: trunk/third/moira/clients/moira/attach.c
> ===================================================================
> --- trunk/third/moira/clients/moira/attach.c	2012-06-01 15:49:50 UTC (rev 25546)
> +++ trunk/third/moira/clients/moira/attach.c	2012-06-01 16:01:35 UTC (rev 25547)
> @@ -1,4 +1,4 @@
> -/* $Id: attach.c 4077 2012-05-07 16:53:10Z zacheiss $
> +/* $Id: attach.c 4081 2012-06-01 14:33:35Z jweiss $
>  *
>  *	This is the file attach.c for the Moira Client, which allows users
>  *      to quickly and easily maintain most parts of the Moira database.
> @@ -32,7 +32,7 @@
> #include <unistd.h>
> #endif /* HAVE_UNISTD_H */
>
> -RCSID("$HeadURL: svn+ssh://svn.mit.edu/moira/trunk/moira/clients/moira/attach.c $ $Id: attach.c 4077 2012-05-07 16:53:10Z zacheiss $");
> +RCSID("$HeadURL: svn+ssh://svn.mit.edu/moira/trunk/moira/clients/moira/attach.c $ $Id: attach.c 4081 2012-06-01 14:33:35Z jweiss $");
>
> char *canonicalize_cell(char *c);
> int GetAliasValue(int argc, char **argv, void *retval);
> @@ -386,7 +386,7 @@
>       if (!strcasecmp(info[FS_TYPE], "AFS"))
> 	{
> 	  char *path, *args[3], *p;
> -	  int status, depth;
> +	  int status, depth, fsltypelen, fsnamelen;
> 	  if (GetTypeFromUser("Filesystem's lockertype", "lockertype",
> 			      &info[FS_L_TYPE]) == SUB_ERROR)
> 	    return NULL;
> @@ -457,7 +457,19 @@
> 		  sprintf(temp_buf, "/afs/%s/%s/%s", info[FS_MACHINE],
> 			  lowercase(info[FS_L_TYPE]), info[FS_NAME]);
> 		}
> +	      /* If the lockername ends in ".lockertype" strip that.
> +	       * eg.  the SITE locker "foo.site" becomes just "foo"
> +	       */
> +	      fsltypelen = strlen(info[FS_L_TYPE]);
> +	      fsnamelen = strlen(temp_buf);
> +	      p = (temp_buf + fsnamelen - fsltypelen);
> +	      if (!strcasecmp(p, info[FS_L_TYPE]) && *(p-1) == '.')
> +		*(p-1) = '\0';
> 	      info[FS_PACK] = strdup(temp_buf);
> +	      fsnamelen = strlen(info[FS_M_POINT]);
> +	      p = (info[FS_M_POINT] + fsnamelen - fsltypelen);
> +	      if (!strcasecmp(p, info[FS_L_TYPE]) && *(p-1) == '.')
> +		*(p-1) = '\0';
> 	    }
> 	}
>       if (GetValueFromUser("Filesystem's Pack Name", &info[FS_PACK]) ==
>
> Modified: trunk/third/moira/debian/changelog
> ===================================================================
> --- trunk/third/moira/debian/changelog	2012-06-01 15:49:50 UTC (rev 25546)
> +++ trunk/third/moira/debian/changelog	2012-06-01 16:01:35 UTC (rev 25547)
> @@ -1,3 +1,10 @@
> +debathena-moira (4.0.0-r4081-0debathena1) unstable; urgency=low
> +
> +  * Re-snapshot moira at r4081, to pick up client changes for lockers of
> +    type 'SITE'
> +
> + -- Jonathan Reed <jdreed@mit.edu>  Fri, 01 Jun 2012 12:01:20 -0400
> +
> debathena-moira (4.0.0-r4077-0debathena1) unstable; urgency=low
>
>   * Re-snapshot moira at r4077, which incorporates the
>
> Modified: trunk/third/moira/gen/hesiod.pc
> ===================================================================
> --- trunk/third/moira/gen/hesiod.pc	2012-06-01 15:49:50 UTC (rev 25546)
> +++ trunk/third/moira/gen/hesiod.pc	2012-06-01 16:01:35 UTC (rev 25547)
> @@ -1,4 +1,4 @@
> -/* $Id: hesiod.pc 4034 2011-03-15 16:34:23Z zacheiss $
> +/* $Id: hesiod.pc 4080 2012-05-30 16:30:24Z jweiss $
>  *
>  * This generates the zone files necessary to load a hesiod server.
>  * The following zones are generated: passwd, uid, pobox, group,
> @@ -23,7 +23,7 @@
>
> EXEC SQL INCLUDE sqlca;
>
> -RCSID("$HeadURL: svn+ssh://svn.mit.edu/moira/trunk/moira/gen/hesiod.pc $ $Id: hesiod.pc 4034 2011-03-15 16:34:23Z zacheiss $");
> +RCSID("$HeadURL: svn+ssh://svn.mit.edu/moira/trunk/moira/gen/hesiod.pc $ $Id: hesiod.pc 4080 2012-05-30 16:30:24Z jweiss $");
>
> #ifndef HTYPE
> #define HTYPE "TXT"
> @@ -497,7 +497,7 @@
>   char name[FILESYS_LABEL_SIZE], type[FILESYS_TYPE_SIZE];
>   char loc[FILESYS_NAME_SIZE], access[FILESYS_RWACCESS_SIZE];
>   char mount[FILESYS_MOUNT_SIZE], comments[FILESYS_COMMENTS_SIZE];
> -  char key[FSGROUP_KEY_SIZE];
> +  char key[FSGROUP_KEY_SIZE], ltype[FILESYS_LOCKERTYPE_SIZE];
>   char aname[ALIAS_NAME_SIZE], trans[ALIAS_TRANS_SIZE];
>   int flag, id, fid;
>   EXEC SQL END DECLARE SECTION;
> @@ -518,19 +518,23 @@
>   sq2 = sq_create();
>
>   EXEC SQL DECLARE f_cursor CURSOR FOR
> -    SELECT label, type, name, mach_id, rwaccess, mount, comments, filsys_id
> +    SELECT label, type, name, mach_id, rwaccess, mount, comments, filsys_id,
> +    lockertype
>     FROM filesys
>     ORDER BY filsys_id;
>   EXEC SQL OPEN f_cursor;
>   while (1)
>     {
>       EXEC SQL FETCH f_cursor INTO :name, :type, :loc, :id, :access,
> -	:mount, :comments, :fid;
> +	:mount, :comments, :fid, :ltype;
>       if (sqlca.sqlcode)
> 	break;
>       strtrim(name);
>       if (!valid(name))
> 	continue;
> +      strtrim(ltype);
> +      if (!strcmp(ltype, "SITE"))
> +	continue;
>       strtrim(type);
>       if (!strcmp(type, "NFS") || !strcmp(type, "RVD"))
> 	{
>
> Modified: trunk/third/moira/incremental/afs/afs.c
> ===================================================================
> --- trunk/third/moira/incremental/afs/afs.c	2012-06-01 15:49:50 UTC (rev 25546)
> +++ trunk/third/moira/incremental/afs/afs.c	2012-06-01 16:01:35 UTC (rev 25547)
> @@ -1,4 +1,4 @@
> -/* $Id: afs.c 3973 2010-02-02 19:15:44Z zacheiss $
> +/* $Id: afs.c 4079 2012-05-23 22:42:25Z jweiss $
>  *
>  * Do AFS incremental updates
>  *
> @@ -41,7 +41,7 @@
> #define STOP_FILE "/moira/afs/noafs"
> #define file_exists(file) (access((file), F_OK) == 0)
>
> -RCSID("$HeadURL: svn+ssh://svn.mit.edu/moira/trunk/moira/incremental/afs/afs.c $ $Id: afs.c 3973 2010-02-02 19:15:44Z zacheiss $");
> +RCSID("$HeadURL: svn+ssh://svn.mit.edu/moira/trunk/moira/incremental/afs/afs.c $ $Id: afs.c 4079 2012-05-23 22:42:25Z jweiss $");
>
> char *whoami;
>
> @@ -426,7 +426,8 @@
> void do_filesys(char **before, int beforec, char **after, int afterc)
> {
>   char cmd[1024];
> -  int acreate, atype, bcreate, btype;
> +  int acreate, atype, bcreate, btype, fsltypelen, fsnamelen;
> +  char *tmp;
>
>   if (afterc < FS_CREATE)
>     atype = acreate = 0;
> @@ -434,6 +435,14 @@
>     {
>       atype = !strcmp(after[FS_TYPE], "AFS");
>       acreate = atoi(after[FS_CREATE]);
> +      /* If the lockername ends in ".lockertype" strip that.
> +       * eg.  the SITE locker "foo.site" becomes just "foo"
> +       */
> +      fsltypelen = strlen(after[FS_L_TYPE]);
> +      fsnamelen = strlen(after[FS_NAME]);
> +      tmp = (after[FS_NAME] + fsnamelen - fsltypelen);
> +      if (!strcasecmp(tmp, after[FS_L_TYPE]) && *(tmp-1) == '.')
> +	*(tmp-1) = '\0';
>     }
>
>   if (beforec < FS_CREATE)
> @@ -449,6 +458,17 @@
>       run_cmd(cmd);
>       return;
>     }
> +  else
> +    {
> +      /* If the lockername ends in ".lockertype" strip that.
> +       * eg.  the SITE locker "foo.site" becomes just "foo"
> +       */
> +      fsltypelen = strlen(before[FS_L_TYPE]);
> +      fsnamelen = strlen(before[FS_NAME]);
> +      tmp = (before[FS_NAME] + fsnamelen - fsltypelen);
> +      if (!strcasecmp(tmp, before[FS_L_TYPE]) && *(tmp-1) == '.')
> +	*(tmp-1) = '\0';
> +    }
>
>   btype = !strcmp(before[FS_TYPE], "AFS");
>   bcreate = atoi(before[FS_CREATE]);
>
> Modified: trunk/third/moira/incremental/afs/afs_create.pl
> ===================================================================
> --- trunk/third/moira/incremental/afs/afs_create.pl	2012-06-01 15:49:50 UTC (rev 25546)
> +++ trunk/third/moira/incremental/afs/afs_create.pl	2012-06-01 16:01:35 UTC (rev 25547)
> @@ -107,6 +107,7 @@
>     # ORG	<user> all <group> all system:cwisfac all system:anyuser rl
>     # PROJECT   <user> all <group> all
>     # REF       <user> all system:anyuser rl
> +    # SITE	system:sites-admin all system:sites-servers write
>     # SW        <user> all system:swmaint all system:authuser rl
>     # SYSTEM    system:administrators all system:anyuser rl
>     # UROP	<user> all <group> all system:facdev all system:authuser rl
> @@ -115,6 +116,8 @@
>     # 1. All directories also have "system:expunge ld".
>
>     @acl=("system:expunge ld");
> +    push(@acl,"system:sites-admin all") if ($type =~ /^(SITE)/);
> +    push(@acl,"system:sites-servers write") if ($type =~ /^(SITE)/);
>     push(@acl,"system:facdev all") if ($type =~ /^(COURSE|UROP)/);
>     push(@acl,"system:swmaint all") if ($type =~ /^(SW)/);
>     push(@acl,"system:cwisfac all") if ($type =~ /^(ORG)/);
> @@ -131,8 +134,10 @@
>
>     if ($type !~ /^(AREF|ORG|SYSTEM)/) {
> 	system("$vos backup $vname >/dev/null");
> -	system("$fs mkm $path/OldFiles $vname.backup");
> -	warn "$locker: Unable to create OldFiles mountpoint\n" if ($?);
> +	if ($type !~ /^(SITE)/) {
> +	    system("$fs mkm $path/OldFiles $vname.backup");
> +	    warn "$locker: Unable to create OldFiles mountpoint\n" if ($?);
> +	}
>     }
>
>     if ($type =~ /ACTIVITY|APROJ|PROJECT/) {
>
> Modified: trunk/third/moira/incremental/afs/afs_utils.pl
> ===================================================================
> --- trunk/third/moira/incremental/afs/afs_utils.pl	2012-06-01 15:49:50 UTC (rev 25546)
> +++ trunk/third/moira/incremental/afs/afs_utils.pl	2012-06-01 16:01:35 UTC (rev 25547)
> @@ -1,4 +1,4 @@
> -# $HeadURL: svn+ssh://svn.mit.edu/moira/trunk/moira/incremental/afs/afs_utils.pl $ $Id: afs_utils.pl 3964 2010-01-07 20:54:34Z zacheiss $
> +# $HeadURL: svn+ssh://svn.mit.edu/moira/trunk/moira/incremental/afs/afs_utils.pl $ $Id: afs_utils.pl 4079 2012-05-23 22:42:25Z jweiss $
>
> use Fcntl;
>
> @@ -28,6 +28,7 @@
>      "ORG", "org",
>      "PROJECT", "project",
>      "REF", "ref",
> +     "SITE", "site",
>      "SW", "sw",
>      "SYSTEM", "system",
>      "UROP", "urop",
>
> Modified: trunk/third/moira/man/Makefile.in
> ===================================================================
> --- trunk/third/moira/man/Makefile.in	2012-06-01 15:49:50 UTC (rev 25546)
> +++ trunk/third/moira/man/Makefile.in	2012-06-01 16:01:35 UTC (rev 25547)
> @@ -1,4 +1,4 @@
> -# $Id: Makefile.in 3961 2010-01-06 18:20:31Z zacheiss $
> +# $Id: Makefile.in 4078 2012-05-14 03:23:06Z zacheiss $
>
> SHELL=/bin/sh
> @SET_MAKE@
> @@ -12,8 +12,7 @@
> mandir=@mandir@
>
> MAN1=	blanche.1 chfn.1 chpobox.1 chsh.1 dcmmaint.1 eunice.1 listmaint.1 \
> -	mailmaint.1 mitch.1 moira.1 mrcheck.1 stanley.1 stella.1 usermaint.1 \
> -	userreg.1
> +	mailmaint.1 mitch.1 moira.1 mrcheck.1 stanley.1 stella.1 usermaint.1
> MAN3=	canonicalize_hostname.3 format_filesys_type.3 moira.3 \
> 	mr_access.3 mr_auth.3 mr_connect.3 mr_disconnect.3 \
> 	mr_host.3 mr_motd.3 mr_noop.3 mr_query.3 \
>
>

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