about summary refs log tree commit diff
path: root/nis
Commit message (Collapse)AuthorAgeFilesLines
* * malloc/malloc.c (_int_malloc): Remove unused any_larger variable.Ulrich Drepper2006-10-112-2/+2
| | | | | | | * nis/nis_defaults.c (__nis_default_access): Don't call getenv twice. * nis/nis_subr.c (nis_getnames): Use __secure_getenv instead of getenv. * sysdeps/generic/unsecvars.h: Add NIS_PATH.
* * nis/nis_subr.c (nis_getnames): Add trailing dot to NIS_PATHUlrich Drepper2006-10-111-3/+6
| | | | | | | | components which lack them. * nis/nis_subr.c (nis_getnames): Make sure that we always return at least one entry consisting of the parameter concatenated with the domain.
* (nis_getnames): Make sure that we always return at least one entry ↵Ulrich Drepper2006-10-111-0/+7
| | | | consisting of the parameter concatenated with the domain.
* * libio/Banner: Likewise.Ulrich Drepper2006-10-061-1/+0
|
* * nis/nis_table.c (nis_list): If __follow_path fails in the newUlrich Drepper2006-10-061-1/+5
| | | | | code, make sure the nis_freeresult call doesn't crash and that the result is reported correctly.
* * nis/nis_table.c (nis_list): Handle FOLLOW_PATH | ALL_RESULTSUlrich Drepper2006-10-065-29/+232
| | | | | | | | | | | | | | | | when callback is NULL. * nis/Versions (libnss_nisplus): Add _nss_nisplus_initgroups_dyn@@GLIBC_PRIVATE. * nis/Makefile (libnss_nisplus-routines): Add nisplus-initgroups. * nis/nss_nisplus/nisplus-grp.c (tablename_val, tablename_len, _nss_create_tablename): Rename to... (grp_tablename_val, grp_tablename_len, _nss_grp_create_tablename): ... these. No longer static. (internal_setgrent): Adjust users. (_nss_nisplus_getgrnam_r, _nss_nisplus_getgrgid_r): Likewise. Don't use locking around _nss_grp_create_tablename call. * nis/nss_nisplus/nisplus-initgroups.c: New file.
* * nis/nss_nis/nis-service.c (internal_nis_getservent_r): . If mapUlrich Drepper2006-08-192-0/+8
| | | | | is empty simply return and use next service. * nis/nss_nis/nis-rpc.c (internal_nis_getrpcent_r): Likewise.
* * nis/nis_xdr.c: Avoid some function calls.Ulrich Drepper2006-08-081-18/+30
|
* 2006-08-07 Jakub Jelinek <jakub@redhat.com> cvs/fedora-glibc-20060807T1859Ulrich Drepper2006-08-071-8/+0
| | | | | | | Ulrich Drepper <drepper@redhat.com> * nis/nis_call.c (rec_dirsearch) [case LOWER_NAME]: Don't take short cut if only one name component is stripped away.
* * nis/nis_call.c: Minor cleanups throughout.Ulrich Drepper2006-08-074-21/+40
| | | | | | | | | | | | | | | (rec_dirsearch) [HIGHER_NAME]: Correctly size ndomain array. (first_shoot): Add search_parent_first parameter. Only if it is set search parent server first. If directory for table found through cold start cache is not the same as referenced in the cache, don't use it. (__nisfind_server): Take additional parameter. Pass it on to first_shoot. (__prepare_niscall): Adjust __nisfind_server call. * nis/rpcsvc/nislib.h: Adjust __nisfind_server prototype. * nis/nis_table.c: Adjust __nisfind_server call. * nis/nis_lookup.c: Likewise. (nis_lookup): Don't loop endlessly if name is reduced to ".".
* Avoid unnecessary setXXent calls into the backend NSS module. If backend ↵Ulrich Drepper2006-07-313-72/+85
| | | | setXXent call failed, don't have internal_setXXent fail. Just remember this until it is needed.
* * nis/nis_subr.c (nis_getnames): Fix the implementation to betterUlrich Drepper2006-06-161-19/+54
| | | | | | match what Solaris does. * string/bug-envz1.c: New file.
* * nis/nis_removemember.c (nis_removemember): Avoid unnecessaryUlrich Drepper2006-05-251-55/+25
| | | | | coping. No need to allocate new array for group members. Just move the pointers and update the size.
* * nis/nis_addmember.c (nis_addmember): Avoid unnecessary copying.Ulrich Drepper2006-05-251-13/+17
| | | | | | | | | | | | | | Avoid memory leak in case realloc fails. Simplification for better code generation. Avoid deprecation warning because of libc_hidden_proto for inet6_option_alloc. * inet/inet6_option.c (option_alloc): Renamed from inet6_option_alloc. Made static. (inet6_option_alloc): New a simple wrapper around option_alloc. (inet6_option_append): Call option_alloc. * include/netinet/in.h: Remove libc_hidden_proto for inet6_option_alloc.
* * nis/nis_callback.c (__nis_create_callback): Always call xdr_freeUlrich Drepper2006-05-251-2/+1
| | | | for cleanup when cb!=NULL [Coverity CID 233].
* * nis/nis_lookup.c (nis_lookup): Use __prepare_niscall instead of cvs/fedora-glibc-20060524T0721Ulrich Drepper2006-05-242-43/+26
| | | | | doing it all here. When server does not know the answer do not fail immediate, try parent first.
* * nis/nis_domain_of_r.c (nis_domain_of_r): Add missing bufferUlrich Drepper2006-05-244-3/+14
| | | | overflow test.
* * nis/nis_call.c (__prepare_niscall): New function. Split out cvs/fedora-glibc-20060521T2153Ulrich Drepper2006-05-2010-356/+450
| | | | | | | | | | | | | | | | | | | | | | | | | | | | from __do_niscall. * nis/nis_table.c (__create_ib_request): Renamed from create_ib_request and exported. (__follow_path): New function. Split out from nis_list. * nis/nis_xdr.h: Add libnsl_hidden_proto for _xdr_ib_request and _xdr_nis_result. * nis/nis_xdr.c: Add libnsl_hidden_def for _xdr_ib_request and _xdr_nis_result. * nis/libnsl.h: Declare __prepare_niscall, __create_ib_request, and __follow_path. * nis/Versions: Export __prepare_niscall, __create_ib_request, __follow_path, __do_niscall3, _xdr_ib_request, and _xdr_nis_result from libnsl for version GLIBC_PRIVATE. * nis/nisplus-parser.h: Remove _nss_nisplus_parse_pwent_chk. Remove entry parameter from _nss_nisplus_parse_pwent and _nss_nisplus_parse_grent. * nis/nss_nisplus/nisplus-parser.c: Likewise. * nis/nss_nisplus/nisplus-pwd.c: Remove support for SETENT_BATCH_READ again. Rewrite getpwent handling to not use nis_first_entry and nis_next_entry. Roll out own niscall handling. * nis/nss_nisplus/nisplus-grp.c: Likewise. * sunrpc/xdr_rec.c: Fix typo in comment. 2006-05-18 David Woodhouse <dwmw2@redhat.com>
* * nis/nis_call.c (__do_niscall3): Avoid code duplication in errorUlrich Drepper2006-05-201-27/+4
| | | | handling.
* * nis/nis_callback.c (internal_nis_do_callback): Don't use mallocUlrich Drepper2006-05-201-14/+6
| | | | | to allocate memory for my_pollfd. Better initialization of cb_is_running. Use TEMP_FAILURE_RETRY.
* * nis/nis_callback.c (__nis_create_callback): Calls to cvs/fedora-glibc-20060519T1550Ulrich Drepper2006-05-191-3/+13
| | | | | svcudp_bufcreate and svctcp_create can fail. Free ->xprt if asprintf call fails.
* * nis/nis_callback.c (__nis_create_callback): Use asprinf insteadUlrich Drepper2006-05-181-16/+10
| | | | | | | of snprintf+strdup. Handle OOM. * nis/nis_callback.c (__nis_create_callback): Allocate cb and cb->serv together. Remove now obsolete free calls. (__nis_destroy_callback): Remove now obsolete free call.
* * nis/nss_compat/compat-pwd.c (internal_setpwent): If nss_set*entUlrich Drepper2006-05-185-44/+48
| | | | | | | | | | | | | | | returned NSS_STATUS_UNAVAIL, still return NSS_STATUS_SUCCESS. * nis/nss_compat/compat-spwd.c (internal_setspent): Likewise. * nis/nss_compat/compat-grp.c (internal_setgrent): Likewise. * nis/nss_compat/compat-initgroups.c (nss_setgrent, nss_endgrent): Removed. (init_nss_interface): Remove initialization of these variables. 2006-05-18 Ulrich Drepper <drepper@redhat.com> * nis/nis_call.c (rec_dirsearch): Little optimization: pull nis_free_directory forward to avoid duplication.
* * nis/nis_call.c (rec_dirsearch): Handle __nis_finddirectory andUlrich Drepper2006-05-181-8/+29
| | | | | | rec_dirsearch returning NULL. (first_shoot): Handle __nis_finddirectory returning NULL. (__nisfind_server): Fix leak when rec_dirsearch returns NULL.
* * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypresp_master.Ulrich Drepper2006-05-123-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypresp_master. * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypbind_resp. * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypbind_resp. * nis/nis_xdr.c: Add libnsl_hidden_def for xdr_cback_data. * include/rpcsvc/nis_callback.h: Add libnsl_hidden_proto for xdr_cback_data. * nis/ypupdate_xdr.c: Add libnsl_hidden_def for xdr_ypupdate_args. * include/rpcsvc/ypupd.h: Add libnsl_hidden_proto for xdr_ypupdate_args. * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypresp_order. * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypresp_order. * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypresp_maplist. * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypresp_maplist. * nis/nis_xdr.c: Add libnsl_hidden_def for xdr_obj_p. * include/rpcsvc/nis_callback.h: New file. * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypresp_val. * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypresp_val. * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypreq_nokey. * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypreq_nokey. * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypmaplist. * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypmaplist. * nis/yp_xdr.c: Add libnsl_hidden_def for xdr_ypreq_nokey. * include/rpcsvc/yp.h: Add libnsl_hidden_proto for xdr_ypreq_nokey.
* * nis/ypupdate_xdr.c: Add libnsl_hidden_def for xdr_ypdelete_args.Ulrich Drepper2006-05-111-0/+1
| | | | | * include/rpcsvc/ypupd.h: Add libnsl_hidden_proto for xdr_ypdelete_args.
* * nis/nis_xdr.h: Mark all functions as hidden. RemoveUlrich Drepper2006-05-111-20/+16
| | | | __BEGIN_DECLS and __END_DECLS, the header is not installed.
* * nis/nis_error.c: Remove table of strings. Use positionUlrich Drepper2006-05-112-54/+78
| | | | | independent mechanism. * nis/nis_error.h: New file.
* * nis/nss-nis.h: Mark __yperr2nss_tab and __yperr2nss_count as hidden.Ulrich Drepper2006-05-102-5/+5
| | | | | * nis/nss-nisplus.h: Mark __niserr2nss_tab and __niserr2nss_count as hidden.
* * io/ftw.c (open_dir_stream): Return right away if REALLOC fails.Ulrich Drepper2006-05-101-2/+2
| | | | | | | | | | | | | | | [Coverity CID 229, 230] * argp/argp-help.c (hol_entry_help): Handle STATE==NULL in ARG and DGETTEXT calls. (hol_help): Likewise. [Coverity CID 226, 227] * string/argz-replace.c (__argz_replace): Unconditionally call free on SRC. [Coverity CID 225] * nis/nis_creategroup.c (nis_creategroup): No need to duplicate the return value of __nis_default_owner and __nis_default_group, it has been especially allocated. [Coverity CID 224]
* * nis/nis_defaults.c (searchXYX): New functions. Used by bothUlrich Drepper2006-05-102-88/+72
| | | | | | | | | | | | | | | | | | | | | searchgroup and searchowner. Significantly simplified. (__nis_default_owner): Remove duplication. Do not locally copy the string before duplicating it. (__nis_default_group): Likewise. * nis/nis_lookup.c (nis_lookup): After calling nis_free_directory, we must clear the variable before calling __nisfind_server. * nis/nis_lookup.c (nis_lookup): Always free memory allocated with nis_getnames. [Coverity CID 223] * locale/programs/locfile.c (locfile_read): Use alloca instead of xmalloc to allocate local repertoire name. [Coverity CID 222] * iconv/iconv_charmap.c (use_to_charmap): No need to dynamically allocate memory for the input to add_bytes. [Coverity CID 221] was allocated here. [Coverity CID 219, 220]
* * posix/wordexp.c (w_addword): Free word if realloc fails and itUlrich Drepper2006-05-101-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | was allocated here. [Coverity CID 219] * posix/getconf.c (print_all): Free confstr data after printing. [Coverity CID 218] * sysdeps/posix/getaddrinfo.c (gaih_inet): Free canon string if list allocation fails. [Coverity CID 215] * nss/nsswitch.c (__nss_configure_lookup): Fix loop end condition. [Coverity CID 213] * argp/argp-help.c (hol_entry_cmp): Don't call canon_doc_option if string is NULL. [Coverity CID 212] * argp/Makefile: Add rules to build and run bug-argp1. * argp/bug-argp1.c: New file. * io/ftw.c (ftw_dir): Use __rawmemchr instead of strchr to find end of string. * stdlib/canonicalize.c (__realpath): Likewise. * locale/programs/ld-time.c (time_finish): Don't dereference NULL pointer. [Coverity CID 206] * elf/dl-dst.h (DL_DST_REQUIRED): Be prepared for missing link map in statically linked code. * elf/dl-load.c (_dl_dst_substitute): When replacing ORIGIN in statically built code, be prepared to have no link map. [Coverity CID 205] * argp/argp-help.c (fill_in_uparams): Handle STATE==NULL in dgettext calls. [Coverity CID 204] * argp/argp-help.c (struct uparams): Remove valid member. Change the one user. (uparam_names): Reduce size. Avoid relative relocations. Moved to read-only segment. (fill_in_uparams): Update for new layout. * sysdeps/unix/sysv/linux/ifaddrs.c (getifaddrs): Parameter can be assumed to always be != NULL. [Coverity CID 202] * argp/argp-help.c (hol_entry_help): Remove some dead code [Coverity CID 200]. * nis/nss_nis/nis-service.c (_nss_nis_getservbyport_r): Optimize away a few more unconditional yperr2nss calls. (_nss_nis_getservbyname_r): Likewise.
* [BZ #2509] cvs/fedora-glibc-20060505T1443Ulrich Drepper2006-05-051-32/+35
| | | | | | | | | | | | 2006-05-05 Jakub Jelinek <jakub@redhat.com> [BZ #2509] * stdio-common/tst-printf.sh: Adjust for tst-printf.c change even on 32-bit arches. 2006-05-05 Ulrich Drepper <drepper@redhat.com> * locale/programs/ld-address.c (address_finish): Fix one more place where the iso639 array might be access beyond the limits.
* * nis/nis_table.c (nis_list): Avoid clearing res twice beforeUlrich Drepper2006-05-051-7/+11
| | | | filling it for the first time.
* * nis/nis_table.c (get_tablepath): Renamed from __get_tablepath. cvs/fedora-glibc-20060505T0554Ulrich Drepper2006-05-051-4/+9
| | | | | Adjust all callers. Free res object content before returning.
* * nis/nss_nis/nis-pwd.c (internal_nis_getpwent_r): Don't try toUlrich Drepper2006-05-011-1/+2
| | | | free outkey in error case when batch_read is set.
* * nis/nss_nis/nis-grp.c (internal_nis_getgrent_r): Don't try toUlrich Drepper2006-05-011-1/+2
| | | | free outkey in error case when batch_read is set [Coverity CID 196].
* * nis/nss_nisplus/nisplus-publickey.c (parse_grp_str): PIDLIST isUlrich Drepper2006-04-301-2/+6
| | | | supposed to have NGRPS elements.
* * nis/nss_nisplus/nisplus-parser.c: Minor optimizations andUlrich Drepper2006-04-301-34/+49
| | | | cleanups. Avoid copying data if it can be used in the old place.
* * nis/nss_nisplus/nisplus-ethers.c: Add missing null pointer check.Ulrich Drepper2006-04-307-7/+72
| | | | | | | | | * nis/nss_nisplus/nisplus-hosts.c: Likewise. * nis/nss_nisplus/nisplus-network.c: Likewise. * nis/nss_nisplus/nisplus-proto.c: Likewise. * nis/nss_nisplus/nisplus-rpc.c: Likewise. * nis/nss_nisplus/nisplus-service.c: Likewise. * nis/nss_nisplus/nisplus-spwd.c: Likewise.
* * nis/nisplus-parser.h (_nss_nisplus_parse_pwent): Add entryUlrich Drepper2006-04-293-88/+207
| | | | | | | | | | parameter. (_nss_nisplus_parse_pwent_chk): New prototype. * nis/nss_nisplus/nisplus-parser.c (_nss_nisplus_parse_pwent): Add entry parameter. Use it for column value in all accesses. Move checks for well-formed reply to... (_nss_nisplus_parse_pwent_chk): ...here. New function. * nis/nss_nisplus/nisplus-pwd.c: Support SETENT_BATCH_READ option.
* * nis/nss_nisplus/nisplus-parser.c: Some cleanups. RemoveUlrich Drepper2006-04-292-18/+12
| | | | | | hidden_def definitions. * nis/nisplus-parser.h: Add parameter names. Remove hidden_proto definitions.
* * nis/nss_nis/nis-spwd.c (internal_nis_getspent_r): Remove dataUlrich Drepper2006-04-297-289/+138
| | | | | | | | | | | | | | | | variable. * nis/nss-nis.h: Define response_t and intern_t. Declare _nis_saveit. * nis/nss_nis/nis-pwd.c: Remove response_t and intern_t definition. (saveit): Renamed to _nis_saveit. Take parameter which is pointer to the intern_t object. Change all users. * nis/nss_nis/nis-grp.c: Remove response_t, intern_t, and saveit definition. Use _nis_saveit instead of saveit. * nis/nss_nis/nis-service.c: Likewise. * nis/nss_nis/nis-initgroups.c: Likewise. (internal_setgrent): Adjust for buffer handling. (internal_getgrent_r): Likewise. * nis/nss_nis/nis-rpc.c: Likewise.
* * nis/nss-default.c (vars): Add SETENT_BATCH_READ.Ulrich Drepper2006-04-286-90/+463
| | | | | | | | | | | | | * nis/nss: Document SETENT_BATCH_READ. * nis/libnsl.h: Define NSS_FLAG_SETENT_BATCH_READ. * nis/nss_nis/nis-service.c (saveit): Don't add NUL byte if the string is already NUL terminated. (internal_nis_endservent): No need to return anything. Change callers. (internal_nis_setservent): One more initialization. * nis/nss_nis/nis-pwd.c: Support SETENT_BATCH_READ option. * nis/nss_nis/nis-grp.c: Likewise. * nis/nss-default.c (init): Rewrite parser to get the variables
* * nis/nss-default.c (init): Rewrite parse to get the variablesUlrich Drepper2006-04-281-17/+23
| | | | from a table.
* * nis/nss_nis/nis-service.c: Avoid passing pointer to staticUlrich Drepper2006-04-281-40/+100
| | | | | variable around. Reduce number of memory allocations by creating list of memory pools.
* * nis/ypclnt.c (__xdr_ypresp_all): Minor optimization in stringUlrich Drepper2006-04-281-5/+5
| | | | handling. Fix typo in comment.
* * nis/nss_nisplus/nisplus-netgrp.c: Cleanups.Ulrich Drepper2006-04-241-5/+5
| | | | | * posix/regex.h: Remove obsolete <sys/types.h> comment and special code if possible. Move compatibility code in .text.compat section.
* * nis/nss_nisplus/nisplus-service.c (_nss_nisplus_parse_servent):Ulrich Drepper2006-04-151-38/+40
| | | | | * nis/nss_nisplus/nisplus-rpc.c (_nss_nisplus_parse_rpcent): Likewise.
* * nis/nss_nisplus/nisplus-rpc.c (_nss_nisplus_parse_rpcent):Ulrich Drepper2006-04-152-35/+40
| | | | | Significant cleanups. Correct adjustment for pointer array. Likewise.