aboutsummaryrefslogtreecommitdiff
path: root/nis
AgeCommit message (Collapse)AuthorFilesLines
2013-01-02Update copyright notices with scripts/update-copyrights.Joseph Myers80-100/+80
2013-01-01Add script to update copyright notices and reformat some to facilitate its use.Joseph Myers4-8/+4
2012-10-012012-10-01 Patsy Franklin <pfrankli@redhat.com>Jeff Law1-5/+5
Honza Horak <hhorak@redhat.com> * nis/yp_xdr.c (xdr_domainname): Use YPMAXDOMAIN as maxsize. (xdr_mapname): Use YPMAXMAP as maxsize. (xdr_peername): Use YPMAXPEER as maxsize. (xdr_keydat): Use YPAXRECORD as maxsize. (xdr_valdat): Use YPMAXRECORD as maxsize.
2012-05-10Make sunrpc code usable againAndreas Jaeger1-0/+6
New configure option --enable-obsolete-rpc makes the deprecated RPC headers and functions available at compile time as they were before version 2.14. This option will be removed at some time in the future after the TI-RPC library becomes fully sufficient for the needs of existing applications.
2012-03-29 [BZ #13761]Jeff Law1-15/+59
* nis/nss_compat/compat-initgroups.c (getgrent_next_nss, _nss_compat_initgroups_dyn): Fall back to malloc/free for large group memberships.
2012-03-07Remove distribute variable from MakefilesUlrich Drepper1-5/+2
2012-02-09Replace FSF snail mail address with URLs.Paul Eggert80-240/+160
2012-01-07Remove pre-ISO C supportUlrich Drepper1-16/+16
No more __const.
2011-12-02Remove aliasing problems in NIS codeUlrich Drepper1-2/+4
2011-11-15Clean up internal fopen usesUlrich Drepper2-5/+6
No need to ever not use c and e.
2011-11-12Fix warning in nis_tableUlrich Drepper1-18/+18
2011-07-06nis/nss_nisplus: Kill warningsUlrich Drepper2-7/+7
2011-07-01nss_compat: query NIS domain only when neededAndreas Schwab2-24/+30
2011-06-10Quash some new warnings from GCC 4.6.Roland McGrath3-9/+7
2011-05-22Add a few more alloca size checksUlrich Drepper1-14/+29
2011-05-05Don't use removed rpc headersAndreas Schwab1-2/+2
2011-04-16Obsolete RPC implementation in libc.Ulrich Drepper1-5/+6
2011-02-04Fix some warning nits.Roland McGrath5-11/+11
2010-11-22Optimize last initgroups patch a bit.Ulrich Drepper1-12/+12
2010-11-22Fix multiple nss_compat initgroups() bugsUlrich Drepper1-8/+11
Compat initgroups() is completely broken; the code will always set skip_initgroups_dyn to true, so initgroups() will never be actually called, but due to the nature of the code, setgrent() won't be called either - thus, subsequent invocations of initgroups() will not return the NIS group list anymore. This is a simple patch that makes sure skip_initgroups_dyn is set only in case initgroups is not available; it also attempts to handle the unavailability of other NSS interfaces better. Conflicts: ChangeLog
2010-09-01More copyright changes.Ulrich Drepper11-337/+393
2010-09-01Remove duplicate version of pmap_getport from NIS code.Ulrich Drepper1-43/+2
2010-06-14Fix use of extend_alloca in NISAndreas Schwab1-1/+1
2010-04-07Implement new mode for NIS passwd.adjunct.byname table.Ulrich Drepper5-47/+102
The passwd.adjunct.byname table will not be used to fill in password fields in the passwd.byname replies. Instead it is used to synthesize the shadow.byname table, should it be missing. This is a useful mode in some installations involving Solaris.
2009-12-10Fix a few error cases in *name4_r lookup handling.Ulrich Drepper2-49/+56
2009-10-29Fix error handling in NIS.Joe Landers1-1/+2
A buffer was freed even though it wasn't allocated as expected. Do this only when !batch_read.
2009-10-29Fix memory leak in NIS grp database handling.Joe Landers1-10/+10
2009-07-01Fix NIS and NIS+ getnetbyaddr backends.Ulrich Drepper2-2/+2
The addresses were interpreted as class-based network addresses.
2009-06-20Fix broken up NIS groups for compat NSS module.Ulrich Drepper1-75/+125
The check for the inclusion of a group in the result gave up too early in case of broken-up NIS groups. We now fall back automatically to the slow mode of using getgrent_r. As an optimization, if there is not blacklist we need not perform the check in the first place and therefore can just accept the results of the initgroups_dyn callback.
2009-06-15Fix memory leak when batch-reading large NIS password maps.Joe Landers1-2/+2
Not the whole was traversed in the function to free all buffers. BZ #10203
2009-02-16* stdlib/monetary.h: Uglify function parameter names. cvs/fedora-glibc-20090218T1534Jakub Jelinek1-86/+87
* sunrpc/rpc/pmap_clnt.h: Likewise. * sunrpc/rpc/svc.h: Likewise. * sunrpc/rpc/xdr.h: Likewise. * sunrpc/rpc/clnt.h: Likewise. * resolv/netdb.h: Likewise. * resolv/arpa/nameser.h: Likewise. * resolv/resolv.h: Likewise. * argp/argp.h: Likewise. * locale/langinfo.h: Likewise. * io/sys/stat.h: Likewise. * posix/spawn.h: Likewise. * nis/rpcsvc/nislib.h: Likewise. * malloc/obstack.h: Likewise. * sysdeps/ia64/bits/link.h: Likewise. * sysdeps/i386/bits/link.h: Likewise. * sysdeps/s390/bits/link.h: Likewise. * sysdeps/powerpc/bits/link.h: Likewise. * sysdeps/x86_64/bits/link.h: Likewise. * sysdeps/sparc/bits/link.h: Likewise. * sysdeps/sh/bits/link.h: Likewise. * sysdeps/unix/sysv/linux/i386/sys/io.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sys/io.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sys/eventfd.h: Likewise. * sysdeps/unix/sysv/linux/sys/eventfd.h: Likewise. 2009-02-16 Jakub Jelinek <jakub@redhat.com> * stdlib/monetary.h: Uglify function parameter names. * sunrpc/rpc/pmap_clnt.h: Likewise. * sunrpc/rpc/svc.h: Likewise. * sunrpc/rpc/xdr.h: Likewise. * sunrpc/rpc/clnt.h: Likewise. * resolv/netdb.h: Likewise. * resolv/arpa/nameser.h: Likewise. * resolv/resolv.h: Likewise. * argp/argp.h: Likewise. * locale/langinfo.h: Likewise. * io/sys/stat.h: Likewise. * posix/spawn.h: Likewise. * nis/rpcsvc/nislib.h: Likewise. * malloc/obstack.h: Likewise. * sysdeps/ia64/bits/link.h: Likewise. * sysdeps/i386/bits/link.h: Likewise. * sysdeps/s390/bits/link.h: Likewise. * sysdeps/powerpc/bits/link.h: Likewise. * sysdeps/x86_64/bits/link.h: Likewise. * sysdeps/sparc/bits/link.h: Likewise. * sysdeps/sh/bits/link.h: Likewise. * sysdeps/unix/sysv/linux/i386/sys/io.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sys/io.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sys/eventfd.h: Likewise. * sysdeps/unix/sysv/linux/sys/eventfd.h: Likewise.
2008-12-08* resolv/res_init.c (__res_vinit): Always assign to statp->nscountUlrich Drepper1-2/+1
after reading name server list.
2008-12-07* nis/nss_nis/nis-hosts.c (_nss_nis_gethostbyname4_r): Fix memoryUlrich Drepper1-22/+36
handling for host name aliases.
2008-07-25* include/rpc/clnt.h: Declare __libc_clntudp_bufcreate andUlrich Drepper1-3/+14
__libc_clntudp_bufcreate_internal. * include/sys/socket.h: Declare __have_sock_cloexec. * socket/Makefile (aux): Add have_sock_cloexec. * socket/have_sock_cloexec.c: New file. * sunrpc/clnt_udp.h (clntudp_bufcreate): Now a wrapper around __libc_clntudp_bufcreate. (__libc_clntudp_bufcreate): Former implementation of clntudp_bufcreate which takes an additional parameter. Create socket with non-blocking mode and close-on-exec flag set, if wanted. * sunrpc/Versions: Export __libc_clntudp_bufcreate@GLIBC_PRIVATE. * nis/ypclnt.c (yp_bind_client_create): Use __libc_clntpudp_bufcreate instead of clntudp_create. The socket has already the close-on-exec flag set if SOCK_CLOEXEC is defined.
2008-05-10* include/resolv.h: Adjust __libc_res_nquery and __libc_res_nsendUlrich Drepper3-89/+254
prototypes. * include/arpa/nameser_compat.h: Define T_UNSPEC. * nis/Versions (libnss_nis): Export _nss_nis_gethostbyname4_r. (libnss_nisplus): Export _nss_nisplus_gethostbyname4_r. * nis/nss_nis/nis-hosts.c (LINE_PARSER): Change to also handle af==AF_UNSPEC. (_nss_nis_gethostbyname4_r): New function. * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_parse_hostent): Change to also handle af==AF_UNSPEC. (get_tablename): New function. Use it to avoid duplication. (_nss_nisplus_gethostbyname4_r): New function. * nscd/aicache.c (addhstaiX): Use gethostbyname4_r function is available. * nss/Versions (libnss_files): Export _nss_files_gethostbyname4_r. * nss/nss.h: Define struct gaih_addrtuple. * nss/nss_files/files-hosts.c (LINE_PARSER): Change to also handle af==AF_UNSPEC. (_nss_files_gethostbyname4_r): New function. * resolv/Versions (libnss_dns): Export _nss_dns_gethostbyname4_r. * resolv/gethnmaddr.c: Adjust __libc_res_nsearch and __libc_res_nquery calls. * resolv/res_query.c (__libc_res_nquery): Take two additional parameters for second answer buffer. Handle type=T_UNSPEC to mean look up IPv4 and IPv6. Change all callers. * resolv/res_send.c (__libc_res_nsend): Take five aditional parameters for an additional query and answer buffer. Pass to send_vc and send_dg. (send_vc): Send possibly two requests and receive two answers. (send_dg): Likewise. * resolv/nss_dns/dns-host.c: Adjust calls to __libc_res_nsearch and __libc_res_nquery. (_nss_dns_gethostbyname4_r): New function. (gaih_getanswer_slice): Likewise. (gaih_getanswer): Likewise. * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Adjust __libc_res_nquery call. * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r): Likewise. (_nss_dns_getnetbyname_r): Adjust __libc_res_nsearch call. * sysdeps/posix/getaddrinfo.c: Use gethostbyname4_r function is available.
2008-03-24* nis/nis_call.c (nis_server_cache_search): Save errno around statUlrich Drepper1-1/+5
call. (__nisfind_server): Similar for open readColdStartFile call. Patch partially by Jim Meyering. * nss/nss_files/files-XXX.c (_nss_files_getXXent_r): Save errno around internal_setent call.
2008-03-19Remove useless "if" before "free".Ulrich Drepper2-14/+7
2008-03-04[BZ #5854]Ulrich Drepper1-1/+1
* nis/ypclnt.c (yp_order): Fix handling of return value of do_ypcall_tr call. Patch by Jeff Moyer <jmoyer@redhat.com>.
2007-11-23[BZ #5378]Ulrich Drepper1-4/+13
* nis/nss_compat/compat-initgroups.c (getgrent_next_nss): Don't use result of nss_getgrgid_r if nothing was found. For other error return with a failure. Partially based on a patch by Petr Baudis <pasky@suse.cz>.
2007-08-26* nis/nis_xdr.c (_xdr_nis_server): Work around gcc alias warning.Ulrich Drepper2-19/+21
(_xdr_directory_obj): Likewise. (xdr_entry_obj): Likewise. (xdr_group_obj): Likewise. (xdr_link_obj): Likewise. (xdr_table_obj): Likewise. (_xdr_nis_result): Likewise. (_xdr_ns_request): Likewise. (_xdr_ib_request): Likewise. (_xdr_nis_taglist): Likewise. (xdr_cback_data): Likewise. * nis/yp_xdr.c (xdr_ypmaplist): Work around gcc warning. (xdr_ypresp_maplist): Likewise.
2007-08-22* nis/nis_table.c (nis_list): Don't fail if __follow_path returnedUlrich Drepper1-4/+9
NIS_NOTFOUND.
2007-07-28* nscd/selinux.c (preserve_capabilities): Initialize new_capsUlrich Drepper1-1/+1
to avoid warning. * iconv/gconv_open.c (__gconv_open): Initialize ptr to avoid warning. * nis/nis_subr.c (nis_getnames): Initialize saveptr to avoid warning. * resolv/inet_ntop.c (inet_ntop6): Initialize best.len and cur.len to avoid warnings.
2007-07-28* nss/nsswitch.c (__nss_lookup_function): Don't cast &ni->known toUlrich Drepper1-1/+1
void **. * nss/nsswitch.h (service_user): Use void * type for KNOWN field. * nss/nss_files/files-hosts.c (LINE_PARSER): Cast host_addr to char * to avoid warning. * nis/nss_nis/nis-hosts.c (LINE_PARSER): Likewise. * timezone/Makefile (CFLAGS-zdump.c): Add -fwrapv. * locale/programs/ld-ctype.c (ctype_finish, set_class_defaults, allocate_arrays): Cast second argument to charmap_find_symbol to char * to avoid warnings. * locale/programs/repertoire.c (repertoire_new_char): Change from_nr, to_nr and cnt to unsigned long, adjust printf format string. * locale/programs/ld-collate.c (insert_value, handle_ellipsis): Cast second argument to new_element to char * to avoid warnings. * locale/weightwc.h (findidx): Cast &extra[-i] to const int32_t *. * intl/gettextP.h (struct loaded_domain): Change plural to const struct expression *. * intl/plural-eval.c (plural_eval): Change first argument to const struct expression *. * intl/plural-exp.c (EXTRACT_PLURAL_EXPRESSION): Change first argument to const struct expression **. * intl/plural-exp.h (EXTRACT_PLURAL_EXPRESSION, plural_eval): Adjust prototypes. * intl/loadmsgcat (_nl_unload_domain): Cast away const in call to __gettext_free_exp. * posix/fnmatch.c (fnmatch): Rearrange code to avoid maybe unitialized wstring/wpattern var warnings. * posix/runtests.c (struct a_test): Make data field const char *. * stdio-common/tst-sprintf2.c (main): Don't declere u, v and buf vars if not LDBL_MANT_DIG >= 106. * stdio-common/Makefile (CFLAGS-vfwprintf.c): Add -Wno-unitialized. * stdio-common/vfprintf.c (vfprintf): Cast first arugment to __find_specmb to avoid warning. * rt/tst-mqueue1.c (do_one_test): Add casts to avoid warnings. * debug/test-strcpy_chk.c (do_tests, do_random_tests): Add casts to avoid warnings. * sysdeps/ieee754/ldbl-96/s_roundl.c (huge): Add L suffix to initializer. * sysdeps/unix/clock_gettime.c (clock_gettime): Only define tv var when it will be actually used. * sunrpc/rpc_cmsg.c (xdr_callmsg): Cast IXDR_PUT_* to void to avoid warnings.
2007-07-22* libio/fileops.c (_IO_new_file_fopen): Recognize 'e' flag and setUlrich Drepper4-28/+143
O_CLOEXEC is needed. * nis/nss_compat/compat-grp.c: Use 'e' flag when opening file. Avoid additional fcntl to set O_CLOEXEC if not needed. * nis/nss_compat/compat-initgroups.c: Likewise. * nis/nss_compat/compat-pwd.c: Likewise. * nis/nss_compat/compat-spwd.c: Likewise.
2007-07-03[BZ #4702]Ulrich Drepper1-1/+4
2007-07-03 Jakub Jelinek <jakub@redhat.com> [BZ #4702] * nis/nss-default.c: Include errno.h. (init): Preserve errno.
2007-06-22* nis/nis_domain_of.c (__nis_domain_of): Make the code a bit moreUlrich Drepper1-2/+2
ISO C compliant.
2007-04-23[BZ #4381]Ulrich Drepper1-4/+16
* nss/nss_files/files-hosts.c (HOST_DB_LOOKUP): Ensure sufficient alignment of buffer and tmp_buffer. * nis/nss_nis/nis-hosts.c (internal_nis_gethostent_r, internal_gethostbyname2_r, _nss_nis_gethostbyaddr_r): Ensure sufficient alignment of buffer. * resolv/nss_dns/dns-hosts.c (getanswer_r): Likewise. Handle buflen bigger than INT_MAX. * resolv/nss_dns/dns-network.c (getanswer_r): Likewise. Add errnop and h_errnop arguments. Fail if buflen is too small. (_nss_dns_getnetbyname_r, _nss_dns_getnetbyaddr_r): Adjust callers. 2007-04-23 Jakub Jelinek <jakub@redhat.com>
2007-04-19* nis/nis_domain_of.c (__nis_domain_of): New function.Ulrich Drepper3-36/+36
* include/rpcsvc/nislib.h (__nis_domain_of): New prototype. * nis/nis_lookup.c (nis_lookup): Use __nis_domain_of. * nis/nis_call.c (rec_dirsearch): Likewise. (first_shoot): Likewise. Remove search_parent_first argument. (struct nis_server_cache): Rename search_parent_first field to search_parent. (nis_server_cache_search, nis_server_cache_add): Rename search_parent_first argument to search_parent. (__nisfind_server): Likewise. If search_parent, call __nis_domain_of.
2007-04-05* nis/nis_call.c (__nisfind_server): Replace (*dir)->do_servers Jakub Jelinek1-3/+3
with obj->do_servers after first_shoot. 2007-04-05 Jakub Jelinek <jakub@redhat.com> * nis/nis_call.c (__nisfind_server): Replace (*dir)->do_servers with obj->do_servers after first_shoot.
2007-03-21* nis/nis_call.c: Include bits/libc-lock.h, sys/stat.h, unistd.h. Jakub Jelinek10-108/+352
(nis_server_cache, nis_server_cache_lock, nis_cold_start_mtime): New variables. (nis_server_cache_search, nis_server_cache_add): New functions. (__nisfind_server): Use them. Add dbp and flags argument, if call __nisbind_create. (__nisbind_create): Add server_used and current_ep arguments, only call __nis_findfastest if server_used is ~0. (__do_niscall2, __prepare_niscall): Adjust callers. (ckey_cache, ckey_cache_size, ckey_cache_allocated, ckey_cache_pid, ckey_cache_euid, ckey_cache_lock): New variables. (get_ckey): New function. (__nisbind_connect): If not dbp->use_udp, pass IPPROTO_TCP to __pmap_getnisport. Save __pmap_getnisport result in dbp->addr.sin_port if non-zero. Use get_ckey to create conversation key. * nis/nis_lookup.c (nis_lookup): Likewise. * nis/nis_table.c (nis_list): Likewise. * nis/rpcsvc/nislib.h (__nisbind_create, __nisfind_server): Adjust prototypes. * nis/nss_nisplus/nisplus-pwd.c (_nss_nisplus_getpwnam_r, _nss_nisplus_getpwuid_r): Pass USE_DGRAM flag to nis_list. * nis/nss_nisplus/nisplus-service.c (_nss_nisplus_getservbyname_r, _nss_nisplus_getservbyport_r): Likewise. * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyname_r, _nss_nisplus_getnetbyaddr_r): Likewise. * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_getspnam_r): Likewise. * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r, _nss_nisplus_getntohost_r): Likewise. * nis/nss_nisplus/nisplus-rpc.c (_nss_nisplus_getrpcbyname_r, _nss_nisplus_getrpcbynumber_r): Likewise. 2007-03-21 Jakub Jelinek <jakub@redhat.com> * nis/nis_call.c: Include bits/libc-lock.h, sys/stat.h, unistd.h. (nis_server_cache, nis_server_cache_lock, nis_cold_start_mtime): New variables. (nis_server_cache_search, nis_server_cache_add): New functions. (__nisfind_server): Use them. Add dbp and flags argument, if call __nisbind_create. (__nisbind_create): Add server_used and current_ep arguments, only call __nis_findfastest if server_used is ~0. (__do_niscall2, __prepare_niscall): Adjust callers. (ckey_cache, ckey_cache_size, ckey_cache_allocated, ckey_cache_pid, ckey_cache_euid, ckey_cache_lock): New variables. (get_ckey): New function. (__nisbind_connect): If not dbp->use_udp, pass IPPROTO_TCP to __pmap_getnisport. Save __pmap_getnisport result in dbp->addr.sin_port if non-zero. Use get_ckey to create conversation key. * nis/nis_lookup.c (nis_lookup): Likewise. * nis/nis_table.c (nis_list): Likewise. * nis/rpcsvc/nislib.h (__nisbind_create, __nisfind_server): Adjust prototypes. * nis/nss_nisplus/nisplus-pwd.c (_nss_nisplus_getpwnam_r, _nss_nisplus_getpwuid_r): Pass USE_DGRAM flag to nis_list. * nis/nss_nisplus/nisplus-service.c (_nss_nisplus_getservbyname_r, _nss_nisplus_getservbyport_r): Likewise. * nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyname_r, _nss_nisplus_getnetbyaddr_r): Likewise. * nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_getspnam_r): Likewise. * nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r, _nss_nisplus_getntohost_r): Likewise. * nis/nss_nisplus/nisplus-rpc.c (_nss_nisplus_getrpcbyname_r, _nss_nisplus_getrpcbynumber_r): Likewise.