about summary refs log tree commit diff
path: root/nis
Commit message (Collapse)AuthorAgeFilesLines
* * 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.
* * nis/nss_nisplus/nisplus-publickey.c: Minor cleanups throughout.Ulrich Drepper2006-04-151-15/+17
|
* * nis/nss_nisplus/nisplus-proto.c (_nss_nisplus_parse_protoent):Ulrich Drepper2006-04-151-32/+27
| | | | | Significant cleanups. Correct adjustment for pointer array Likewise.
* * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_parse_netent):Ulrich Drepper2006-04-151-32/+34
| | | | | * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_parse_hostent): Likewise.
* * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_parse_hostent):Ulrich Drepper2006-04-151-44/+44
| | | | Significant cleanups. Correct adjustment for pointer array.
* * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_parse_etherent):Ulrich Drepper2006-04-142-10/+11
| | | | | | | Minor cleanups. NUL terminate name string. * nis/Versions: No need to export _nss_nisplus_parse_grent, _nss_nisplus_parse_pwent, and _nss_nisplus_parse_spent.
* * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_parse_aliasent):Ulrich Drepper2006-04-142-22/+32
| | | | Avoid unnecessary allocation. Fix adjustment for pointer value.
* * nis/nss_nisplus/nisplus-parser.c: Cleanups, use NIS_RES_*Ulrich Drepper2006-04-141-31/+25
| | | | macros. Avoid unnecessary allocation.
* * nis/Makefile (libnsl-routimes): Add nss-default.Ulrich Drepper2006-04-148-103/+152
| | | | | | | | | | | | | | | | | | | | | | * nis/Versions (libnsl) [GLIBC_PRIVATE]: Export _nsl_default_nss. * nis/nss-nis.c: Move /etc/default/nss handling to... * nis/nss-default.c: ...here. New file. * nis/libnsl.h: New file. * nis/nss-nis.h: Remove NSS_FLAG_* definitions and _nis_default_nss plus auxilary definitions. * nis/nss_nis/nis-initgroups.c: Use _nsl_default_nss instead of _nis_default_nss. * nis/nss_nis/nis-service.c: Likewise. 2006-04-07 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/powerpc/fpu/bits/mathinline.h [__WORDSIZE == 64 || _ARCH_PWR4]: Define __CPU_HAS_FSQRT. (__ieee754_sqrt): Fix comment. (__ieee754_sqrtf): Fix comment. * sysdeps/powerpc/fpu/e_sqrt.c (__ieee754_sqrt): Fix comment. Check __CPU_HAS_FSQRT instead of dl_hwcap. * sysdeps/powerpc/fpu/e_sqrtf.c (__ieee754_sqrtf): Likewise.
* * nis/nss_nis/nis-alias.c: Optimize use of yperr2nss. Avoid callingUlrich Drepper2006-04-0913-488/+486
| | | | | | | | | | | | | | | | it for YPERR_SUCCESS. Minor cleanups. Add __builtin_expect. * nis/nss_nis/nis-ethers.c: Likewise. * nis/nss_nis/nis-grp.c: Likewise. * nis/nss_nis/nis-hosts.c: Likewise. * nis/nss_nis/nis-initgroups.c: Likewise. * nis/nss_nis/nis-netgrp.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * nis/nss_nis/nis-proto.c: Likewise. * nis/nss_nis/nis-publickey.c: Likewise. * nis/nss_nis/nis-pwd.c: Likewise. * nis/nss_nis/nis-rpc.c: Likewise. * nis/nss_nis/nis-service.c: Likewise. * nis/nss_nis/nis-spwd.c: Likewise.
* * nis/nis_ping.c: Remove unnecessary conditionals beforeUlrich Drepper2006-04-082-10/+6
| | | | | nis_freeresult calls. * nis/nis_ismember.c: Likewise.
* * io/fts.c (fts_build): Call fts_lfree in the two error casesUlrich Drepper2006-04-081-2/+5
| | | | | | | | | | after the loop [Coverity CID 187]. * nis/nis_getservlist.c (nis_getservlist): Also free lookup result in error case [Coverity CID 189]. * nis/nis_getservlist.c (nis_getservlist): One more free call needed [Coverity CID 190].
* * elf/ldconfig.c (main): Use rawmemchr instead of strchr.Ulrich Drepper2006-04-072-5/+5
| | | | | | | | | | | | | * nis/nis_call.c (rec_dirsearch): Likewise. * nis/nis_local_names.c (nis_local_host): Likewise. (nis_local_directory): Likewise. * intl/explodename.c (_nl_explode_name): Likewise. * sysdeps/generic/unwind-dw2.c (execute_cfa_program): Don't handle DW_CFA_GNU_windiw_save if it obviously cannot work [Coverity CID 102]. * locale/programs/ld-address.c (address_finish): Fix conditions for error messages [Coverity CID 104].
* * libio/fmemopen.c (fmemopen): Free stream memory in case ofUlrich Drepper2006-04-0715-109/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | invalid length [Coverity CID 106]. * nss/nss_files/files-key.c (search): Close stream before successful return [Coverity CID 107]. * io/fts.c (fts_open): Don't allocate parent if *argv==NULL [Coverity CID 108]. * sunrpc/rpc_cout.c (inline_struct): Free sizestr after use [Coverity CID 110, 109]. * sunrpc/rpc_scan.c (docppline): Free file string if it is not going to be used [Coverity CID 111]. * sysdeps/unix/sysv/linux/getsourcefilter.c (getsourcefilter): Free memory if socket level value cannot be retrieved [Coverity CID 112]. * nis/nis_clone_dir.c (nis_clone_directory): Free all memory in error case [Coverity CID 114]. * nis/nis_clone_res.c (nis_clone_result): Free all memory in the error cases [Coverity CID 115]. * sunrpc/rpc_parse.c (get_definition): Free defp if tok == TOK_EOF [Coverity CID 116]. * sysdeps/unix/sysv/linux/setsourcefilter.c (setsourcefilter): Free memory if socket level value cannot be retrieved [Coverity CID 117]. * elf/cache.c (save_cache): Initialize pad to avoid writing uninitialized data to disk. * elf/cache.c (save_cache): Free file_entries_new [Coverity CID 118]. * intl/finddomain.c (_nl_find_domain): Avoid strdup of expand locale name, use strdupa. Remove free call [Coverity CID 119]. * sunrpc/rpc_main.c (generate_guard): Avoid extra allocation and the resulting leak [Coverity CID 121]. * sunrpc/rpc_main.c (mkfile_output): Free all allocated memory [Coverity CID 122]. * sunrpc/rpc_main.c (h_output): Free guard after we are done [Coverity CID 123]. * sunrpc/svc_udp.c (cache_set): Free victim if newbuf allocation fails [Coverity CID 126]. * sunrpc/svc_udp.c (svcudp_enablecache): Free memory in error cases [Coverity CID 127]. * nis/nis_table.c (__create_ib_request): Free ibreq in case strdup fails [Coverity CID 128]. * nis/nis_getservlist.c (nis_getservlist): Free all memory in case of an error [Coverity CID 130, 129]. * nis/nis_print_group_entry.c (nis_print_group_entry): If nis_lookup call failed, return. Free lookup result in error cases [Coverity CID 131]. * nis/nis_removemember.c (nis_removemember): Free all memory in error cases [Coverity CID 132]. * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r): Always free lookup result [Coverity CID 134]. * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r): Always free lookup result [Coverity CID 135]. * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_getntohost_r): Always free lookup result [Coverity CID 136]. * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r): Before retrying, free old result [Coverity CID 137]. * nis/nss_nisplus/nisplus-publickey.c (_nss_nisplus_netname2user): Free res in case UID is zero [Coverity CID 138]. * nis/ypclnt.c (yp_update): Always free master string [Coverity CID 140]. * nis/nis_creategroup.c (nis_creategroup): Free all memory in error cases [Coverity CID 143, 142, 141]. * nis/nss_nis/nis-publickey.c (_nss_nis_getpublickey): Free result if yp_match call succeeded [Coverity CID 155]. * nis/nss_nis/nis-publickey.c (_nss_nis_getsecretkey): Free string allocated in yp_match at all times [Coverity CID 157, 156]. * nscd/nscd.c (write_pid): Close stream also if writing failed [Coverity CID 165]. * nis/nis_table.c (nis_add_entry): Move test for NULL parameter ahead of first use [Coverity CID 167]. * nis/nss_nis/nis-alias.c (_nss_nis_getaliasbyname_r): Move test for NULL parameter ahead of first use [Coverity CID 168]. * intl/finddomain.c (_nl_find_domain): We never return NULL if we found the locale [Coverity CID 169]. * inet/getnameinfo.c (getnameinfo): __getservbyport_r does not set herrno [Coverity CID 178]. * nis/nis_checkpoint.c (nis_checkpoint): Don't access and returned freed object [Coverity CID 182].
* * sysdeps/sparc/sparc32/bits/atomic.hUlrich Drepper2006-03-259-18/+24
| | | | | | | | | | | | | | | | | | | | | | | (__v9_compare_and_exchange_val_32_acq): Add "memory" clobber. * sysdeps/sparc/sparc32/sparcv9/bits/atomic.h (__arch_compare_and_exchange_val_32_acq, atomic_exchange_acq): Likewise. * sysdeps/sparc/sparc64/bits/atomic.h (__arch_compare_and_exchange_val_32_acq, __arch_compare_and_exchange_val_64_acq, atomic_exchange_acq): Likewise. 2006-03-24 Jakub Jelinek <jakub@redhat.com> * nis/nss_nisplus/nisplus-proto.c (_nss_create_tablename): Check the return value of malloc rather than the static var again. * nis/nss_nisplus/nisplus-grp.c (_nss_create_tablename): Likewise. * nis/nss_nisplus/nisplus-network.c (_nss_create_tablename): Likewise. * nis/nss_nisplus/nisplus-ethers.c (_nss_create_tablename): Likewise. * nis/nss_nisplus/nisplus-rpc.c (_nss_create_tablename): Likewise. * nis/nss_nisplus/nisplus-service.c (_nss_create_tablename): Likewise. * nis/nss_nisplus/nisplus-hosts.c (_nss_create_tablename): Likewise. * nis/nss_nisplus/nisplus-alias.c (_nss_create_tablename): Likewise. * nis/nss_nisplus/nisplus-pwd.c (_nss_pwd_create_tablename): Likewise.
* * po/libc.pot: Regenerated.Roland McGrath2006-02-221-23/+23
| | | | | | | 2006-02-22 Jakub Jelinek <jakub@redhat.com> * nis/ypclnt.c (yperr_string, ypbinderr_string): Add N_() around string literals.
* * nis/nis_call.c (inetstr2int): Optimize.Ulrich Drepper2005-12-091-16/+7
|
* * nis/nis_call.c (__nisbind_create): Remove __nisbind_destroy,Ulrich Drepper2005-12-082-9/+2
| | | | | | | | | | | ->clnt cannot be != NULL. (__do_niscall): No need to use __nisbind_destroy, __nisbind_next did it. (__nisbind_connect): use_auth is already TRUE, otherwise we would not be here. * nis/nis_lookup.c (nis_lookup): Remove unnecessary __nisbind_destroy calls. __nisbind_next does all that.
* * nis/ypclnt.c (yp_update): Before trying default authentication,Ulrich Drepper2005-12-081-0/+1
| | | | free DES descriptor.
* * nis/nis_table.c (nis_list): Fix memory handling in error case.Ulrich Drepper2005-12-081-39/+40
| | | | | | | 2005-12-07 Ulrich Drepper <drepper@redhat.com> * nis/nis_table.c (nis_list): Remove have_tablepath, just use the pointer value itself.
* (nis_list): One more reallocation optimization.Ulrich Drepper2005-12-041-5/+15
|
* * nis/nis_table.c (nis_list): Optimize freeing and reallocation ofUlrich Drepper2005-12-041-0/+10
| | | | result record.
* * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r):Ulrich Drepper2005-12-031-17/+11
| | | | Better sized buffers. Correct error case handling.
* * nis/nis_error.c (nis_sperror_r): Let snprintf determine whetherUlrich Drepper2005-12-036-88/+62
| | | | | | | | there is an overflow. * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_setnetgrent): Rewrite to use snprintf. * nis/nss_nisplus/nisplus-publickey.c (_nss_nisplus_netname2user): Likewise.
* * nis/nss_nisplus/nisplus-service.c: Fix locking to useUlrich Drepper2005-12-037-728/+860
| | | | | | | | | | | | | | | | | | | _nss_create_tablename. Avoid unnecessary copying, remove unnecessary variables, general cleanup. * nis/nss_nisplus/nisplus-rpc.c: Likewise. * nis/nss_nisplus/nisplus-proto.c: Likewise.. * nis/nss_nisplus/nisplus-network.c: Fix locking to use _nss_create_tablename. Avoid unnecessary copying, general cleanup. * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_getipnodebyname_r): Removed. Fix locking to use _nss_create_tablename. Avoid unnecessary copying, general cleanup. * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_getntohost_r): Correctly construct request. Fix locking to use _nss_create_tablename. Avoid unnecessary copying, general cleanup. * nis/nss_nisplus/nisplus-alias.c: Fix locking to use _nss_create_tablename. Avoid unnecessary copying, general cleanup.
* * nis/nss_nisplus/nisplus-pwd.c (_nss_pwd_create_tablename):Ulrich Drepper2005-12-033-277/+303
| | | | | | | | | | | | Renamed from _nss_create_tablename. Export from file (but not DSO). (pwd_tablename_val): Renamed from tablename_val, mark hidden. (pwd_tablename_len): Renamed from tablename_len, mark hidden. Change all users. * nis/nss_nisplus/nisplus-spwd.c (_nss_create_tablename): Removed. Use _nss_pwd_create_tablename now. Use pwd_tablename_val and pwd_tablename_len. Remove unnecessary variables, general cleanup. * nis/nss_nisplus/nisplus-grp.c: Likewise.
* (nis_list): Add more free calls in error cases.Ulrich Drepper2005-11-271-0/+1
|
* * nis/nis_lookup.c (nis_lookup): Mark RPCTIMEOUT as const. PrettyUlrich Drepper2005-11-272-9/+10
| | | | printing.
* * nis/nis_table.c (__create_ib_request): Use strdupa instead ofUlrich Drepper2005-11-272-24/+17
| | | | | | | variable size array. (RPCTIMEOUT): Mark as const. (RPCTIMEOUT, UDPTIMEOUT): Mark as const.
* (yp_bind_ypbindprog): Initialize clnt_saddr by hand. (ypdomainname): Renamed ↵Ulrich Drepper2005-11-261-109/+165
| | | | from __ypdomainname. No need for initializer. (ypbindlist): Renamed from __ypbindlist. (do_ypcall): Check memory allocation suceeded before calling yp_bind_ypbindprog. (yperr_string): Reduce size of function by using only one gettext call. (ypbinderr_string): Likewise. (yp_match): Free response in case memory for return value cannot be allocated. (yp_first): Likewise. (yp_next): Likewise. (do_ypcall_tr): New function which translates error codes as well. (yp_match, yp_next, yp_master, yp_order, yp_maplist): Use it. (yp_all): Correct test for invalid parameter. Pretty printing.
* [BZ #1925]Ulrich Drepper2005-11-251-1/+1
| | | | | | 2005-11-25 Ulrich Drepper <drepper@redhat.com> [BZ #1925] * nis/ypclnt.c (yp_order): Correct test for invalid parameter.
* (_nss_nis_getpublickey): Fix off by one error.Ulrich Drepper2005-10-281-2/+2
|
* * inet/getnetgrent_r.c: Include assert. cvs/fedora-glibc-20050912T0656Ulrich Drepper2005-09-102-22/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (setup): Remove FUNC_NAME and ALL arguments, assume they are always "setnetgrent" and 1. (endnetgrent_hook): New function. (internal_endnetgrent): Use it. (__internal_setnetgrent_reuse): Use it. Adjust setup caller. If status is NSS_STATUS_SUCCESS, yet action is continue, call endnetgrent hook. (internal_getnetgrent_r): Use __nss_lookup_function rather than setup. Recompute getfct pointer after successful __internal_setnetgrent_reuse. Don't use __nss_next. (innetgr): Use __nss_lookup_function instead of __nss_lookup. Adjust setup caller. * nss/nss_files/files-netgrp.c (_nss_files_endnetgrent): Always clear data_size and cursor. Add libnss_files_hidden_proto and libnss_files_hidden_def. (_nss_files_setnetgrent): Call _nss_files_endnetgrent on failure. * nis/nss_nis/nis-netgrp.c (internal_endnetgrent): Always clear data_size and cursor. (_nss_nis_setnetgrent): Don't call internal_endnetgrent. (_nss_nis_getnetgrent_r): Remove result->cursor == NULL handling. * nis/nss_nisplus/nisplus-netgrp.c (internal_endnetgrent): Always clear data_size and position. (_nss_nisplus_setnetgrent): Don't call internal_endnetgrent. 2005-09-09 Ulrich Drepper <drepper@redhat.com> * nss/getent.c (netgroup_keys): Call endnetgrent. (main): Call mtrace. * nss/nss_files/files-netgrp.c (_nss_files_setnetgrent): We don't need locking for the stream. Use feof_unlocked. 2005-09-09 Jakub Jelinek <jakub@redhat.com>
* [BZ #1188]Ulrich Drepper2005-08-163-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-08-10 Sergio Gelato <Sergio.Gelato@astro.su.se> [BZ #1188] * nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Change assert check from (len > 0) to (len >= 0). 2005-08-16 Ulrich Drepper <drepper@redhat.com> * nis/nis_xdr.c (_xdr_nis_result): Fix type of res variable. Reported by Thomas Schwinge. 2005-08-15 Jakub Jelinek <jakub@redhat.com> * nis/nis_subr.c (nis_leaf_of_r): Handle buflen == 0 correctly. 2005-08-16 Ulrich Drepper <drepper@redhat.com> * nss/getent.c (more_help): Use open_memstream instead of handling memory allocation ourselves. 2005-08-16 Jay Fenlason <fenlason@redhat.com> * nss/getent.c (parse_options): change the -s option to support {database}:{search} to override /etc/resolv.conf for only the specified database.
* * nis/nis_subr.c: Some minor code cleanups.Ulrich Drepper2005-07-301-15/+5
|
* * nis/nis_xdr.c: Help gcc to generate unnecessary wrapper functions.Ulrich Drepper2005-07-281-2/+2
|