diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-06-01 13:10:54 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-06-01 13:10:54 +0000 |
commit | 26a60f90c7a143e29793cddc721b8e5427fa2a6c (patch) | |
tree | 7f0f18f83e947b927358bd86768652cd4362aa84 /nis/nis_creategroup.c | |
parent | 6e607d847cc9ad50610238da03a92c4b01eb577a (diff) | |
download | glibc-26a60f90c7a143e29793cddc721b8e5427fa2a6c.tar glibc-26a60f90c7a143e29793cddc721b8e5427fa2a6c.tar.gz glibc-26a60f90c7a143e29793cddc721b8e5427fa2a6c.tar.bz2 glibc-26a60f90c7a143e29793cddc721b8e5427fa2a6c.zip |
Update.
1998-06-01 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nis_call.c: Make directory search faster.
* nis/nis_callback.c: Insert public key of user in callback data.
* nis/nis_clone_obj.c: Make size from type u_long, not u_int.
* nis/nis_creategroup.c: Check for NULL pointer, fill in more fields.
* nis/nis_findserv.c: Rename __pmap_getport to __pmap_getnisport.
* nis/nis_intern.h: Remove duplicated prototype.
1998-06-01 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* sunrpc/auth_des.c: Move prototypes from here ...
* sunrpc/rpc/auth.h: ... to here.
* sunrpc/clnt_tcp.c: Add more control flags.
* sunrpc/clnt_udp.c: Likewise.
* sunrpc/netname.c (host2netname): Remove prefixing dot from
domainname.
* sunrpc/rpc/clnt.h: Document, which control flags are not
implementable.
* sunrpc/svcauth_des.c: Use key_decryptsession_pk to avoid deadlock.
Diffstat (limited to 'nis/nis_creategroup.c')
-rw-r--r-- | nis/nis_creategroup.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nis/nis_creategroup.c b/nis/nis_creategroup.c index 240573145f..a96d67d29c 100644 --- a/nis/nis_creategroup.c +++ b/nis/nis_creategroup.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1997 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997. @@ -45,16 +45,23 @@ nis_creategroup (const_nis_name group, u_long flags) return NIS_BADNAME; obj = calloc (1, sizeof (nis_object)); + if (obj == NULL) + return NIS_NOMEMORY; + + obj->zo_name = strdup (leafbuf); obj->zo_owner = strdup (__nis_default_owner (NULL)); obj->zo_group = strdup (__nis_default_group (NULL)); + obj->zo_domain = strdup (domainbuf); obj->zo_access = __nis_default_access (NULL, 0); - obj->zo_ttl = __nis_default_ttl (0); + obj->zo_ttl = 60 * 60; obj->zo_data.zo_type = NIS_GROUP_OBJ; obj->zo_data.objdata_u.gr_data.gr_flags = flags; obj->zo_data.objdata_u.gr_data.gr_members.gr_members_len = 0; obj->zo_data.objdata_u.gr_data.gr_members.gr_members_val = NULL; res = nis_add (buf, obj); + if (res == NULL) + return NIS_NOMEMORY; status = res->status; nis_freeresult (res); nis_free_object (obj); |