[1653] in Moira
Allow type "none" entries in blanche
daemon@ATHENA.MIT.EDU (Nickolai Zeldovich)
Thu Aug 17 01:24:45 2000
Message-Id: <200008170524.BAA07266@multics.mit.edu>
To: moiradev@MIT.EDU
Date: Thu, 17 Aug 2000 01:24:43 -0400
From: Nickolai Zeldovich <kolya@MIT.EDU>
This adds support for type none ``objects'' (for lack of a better
word) in blanche, mostly to allow setting the memacl to NONE.
-- kolya
Index: blanche.c
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/blanche/blanche.c,v
retrieving revision 1.50
diff -c -r1.50 blanche.c
*** blanche.c 2000/08/16 05:33:17 1.50
--- blanche.c 2000/08/17 05:22:16
***************
*** 33,40 ****
#define M_LIST 2
#define M_STRING 3
#define M_KERBEROS 4
! char *typename[] = { "ANY", "USER", "LIST", "STRING", "KERBEROS" };
/* argument parsing macro */
#define argis(a, b) (!strcmp(*arg + 1, a) || !strcmp(*arg + 1, b))
--- 33,41 ----
#define M_LIST 2
#define M_STRING 3
#define M_KERBEROS 4
+ #define M_NONE 5
! char *typename[] = { "ANY", "USER", "LIST", "STRING", "KERBEROS", "NONE" };
/* argument parsing macro */
#define argis(a, b) (!strcmp(*arg + 1, a) || !strcmp(*arg + 1, b))
***************
*** 1252,1257 ****
--- 1253,1260 ----
m->type = M_STRING;
else if (!strcasecmp("kerberos", s))
m->type = M_KERBEROS;
+ else if (!strcasecmp("none", s))
+ m->type = M_NONE;
else
{
m->type = M_ANY;
***************
*** 1263,1269 ****
else
{
m->name = strdup(s);
! m->type = M_ANY;
}
return m;
}
--- 1266,1272 ----
else
{
m->name = strdup(s);
! m->type = strcasecmp(s, "none") ? M_ANY : M_NONE;
}
return m;
}