(parse_hdbflags2int): use `int2flags'
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3233 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
27
admin/load.c
27
admin/load.c
@@ -168,31 +168,12 @@ parse_event(Event *ev, char *str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static HDBFlags
|
static HDBFlags
|
||||||
parse_flags(char *str)
|
parse_hdbflags2int(char *str)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
HDBFlags f;
|
|
||||||
parse_integer(&i, str);
|
parse_integer(&i, str);
|
||||||
f.initial = i & 1;
|
|
||||||
i >>= 1;
|
return int2flags(i);
|
||||||
f.forwardable = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.proxiable = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.renewable = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.postdate = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.server = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.client = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.invalid = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.require_preauth = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.change_pw = i & 1;
|
|
||||||
return f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -284,7 +265,7 @@ doit(char *filename, int merge)
|
|||||||
ent.max_life = parse_integer(NULL, e.max_life);
|
ent.max_life = parse_integer(NULL, e.max_life);
|
||||||
ent.max_renew = parse_integer(NULL, e.max_renew);
|
ent.max_renew = parse_integer(NULL, e.max_renew);
|
||||||
|
|
||||||
ent.flags = parse_flags(e.flags);
|
ent.flags = parse_hdbflags2int(e.flags);
|
||||||
db->store(context, db, &ent);
|
db->store(context, db, &ent);
|
||||||
hdb_free_entry (context, &ent);
|
hdb_free_entry (context, &ent);
|
||||||
}
|
}
|
||||||
|
@@ -168,31 +168,12 @@ parse_event(Event *ev, char *str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static HDBFlags
|
static HDBFlags
|
||||||
parse_flags(char *str)
|
parse_hdbflags2int(char *str)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
HDBFlags f;
|
|
||||||
parse_integer(&i, str);
|
parse_integer(&i, str);
|
||||||
f.initial = i & 1;
|
|
||||||
i >>= 1;
|
return int2flags(i);
|
||||||
f.forwardable = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.proxiable = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.renewable = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.postdate = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.server = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.client = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.invalid = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.require_preauth = i & 1;
|
|
||||||
i >>= 1;
|
|
||||||
f.change_pw = i & 1;
|
|
||||||
return f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -284,7 +265,7 @@ doit(char *filename, int merge)
|
|||||||
ent.max_life = parse_integer(NULL, e.max_life);
|
ent.max_life = parse_integer(NULL, e.max_life);
|
||||||
ent.max_renew = parse_integer(NULL, e.max_renew);
|
ent.max_renew = parse_integer(NULL, e.max_renew);
|
||||||
|
|
||||||
ent.flags = parse_flags(e.flags);
|
ent.flags = parse_hdbflags2int(e.flags);
|
||||||
db->store(context, db, &ent);
|
db->store(context, db, &ent);
|
||||||
hdb_free_entry (context, &ent);
|
hdb_free_entry (context, &ent);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user