about summary refs log tree commit diff
path: root/sunrpc/des_soft.c
Commit message (Collapse)AuthorAgeFilesLines
* Disallow use of DES encryption functions in new programs.Zack Weinberg2018-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The functions encrypt, setkey, encrypt_r, setkey_r, cbc_crypt, ecb_crypt, and des_setparity should not be used in new programs, because they use the DES block cipher, which is unacceptably weak by modern standards. Demote all of them to compatibility symbols, and remove their prototypes from installed headers. cbc_crypt, ecb_crypt, and des_setparity were already compat symbols when glibc was configured with --disable-obsolete-rpc. POSIX requires encrypt and setkey to be available when _XOPEN_CRYPT is defined, so this change also removes the definition of X_OPEN_CRYPT from <unistd.h>. The entire "DES Encryption" section is dropped from the manual, as is the mention of AUTH_DES and FIPS 140-2 in the introduction to crypt.texi. The documentation of 'memfrob' cross-referenced the DES Encryption section, which is replaced by a hyperlink to libgcrypt, and while I was in there I spruced up the actual documentation of 'memfrob' and 'strfry' a little. It's still fairly jokey, because those functions _are_ jokes, but they do also have real use cases, so people trying to use them for real should have all the information they need. DES-based authentication for Sun RPC is also insecure and should be deprecated or even removed, but maybe that can be left as TI-RPC's problem.
* Include shlib-compat.h in many sunrpc/nis source files.Zack Weinberg2017-06-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every file that uses libc_hidden_nolink_sunrpc or libnsl_hidden_nolink_def needs to include shlib-compat.h. Currently, most of them are getting it via stdio.h, because libio.h refers to SHLIB_COMPAT when _LIBC is defined, so it includes shlib-compat.h. My experimental patch to not install libio.h breaks that chain; stdio.h no longer pulls in libio.h even for internal users. Accordingly, this patch adds #include <shlib-compat.h> to many files in sunrpc/ and nis/. There are also a small number of really obvious fixups to includes that caught my eye while proofreading the patch - not including headers twice in a row, not worrying about portability to Ultrix anymore, sort of thing. * nis/nis_add.c, nis/nis_addmember.c, nis/nis_call.c * nis/nis_checkpoint.c, nis/nis_clone_dir.c, nis/nis_clone_obj.c * nis/nis_clone_res.c, nis/nis_creategroup.c, nis/nis_defaults.c * nis/nis_destroygroup.c, nis/nis_domain_of.c * nis/nis_domain_of_r.c, nis/nis_error.c, nis/nis_file.c * nis/nis_free.c, nis/nis_getservlist.c, nis/nis_ismember.c * nis/nis_local_names.c, nis/nis_lookup.c, nis/nis_mkdir.c * nis/nis_modify.c, nis/nis_ping.c, nis/nis_print.c * nis/nis_print_group_entry.c, nis/nis_remove.c * nis/nis_removemember.c, nis/nis_rmdir.c, nis/nis_server.c * nis/nis_subr.c, nis/nis_table.c, nis/nis_util.c * nis/nis_verifygroup.c, nis/nis_xdr.c, nis/yp_xdr.c * nis/ypclnt.c, nis/ypupdate_xdr.c, sunrpc/auth_des.c * sunrpc/auth_none.c, sunrpc/auth_unix.c, sunrpc/authdes_prot.c * sunrpc/authuxprot.c, sunrpc/clnt_gen.c, sunrpc/clnt_perr.c * sunrpc/clnt_raw.c, sunrpc/clnt_simp.c, sunrpc/clnt_tcp.c * sunrpc/clnt_udp.c, sunrpc/clnt_unix.c, sunrpc/des_crypt.c * sunrpc/des_soft.c, sunrpc/get_myaddr.c, sunrpc/key_call.c * sunrpc/key_prot.c, sunrpc/netname.c, sunrpc/pm_getmaps.c * sunrpc/pm_getport.c, sunrpc/pmap_clnt.c, sunrpc/pmap_prot.c * sunrpc/pmap_prot2.c, sunrpc/pmap_rmt.c, sunrpc/publickey.c * sunrpc/rpc_cmsg.c, sunrpc/rpc_dtable.c, sunrpc/rpc_prot.c * sunrpc/rpc_thread.c, sunrpc/rtime.c, sunrpc/svc.c * sunrpc/svc_auth.c, sunrpc/svc_raw.c, sunrpc/svc_run.c * sunrpc/svc_tcp.c, sunrpc/svc_udp.c, sunrpc/svc_unix.c * sunrpc/svcauth_des.c, sunrpc/xdr.c, sunrpc/xdr_array.c * sunrpc/xdr_float.c, sunrpc/xdr_intXX_t.c, sunrpc/xdr_mem.c * sunrpc/xdr_rec.c, sunrpc/xdr_ref.c, sunrpc/xdr_sizeof.c * sunrpc/xdr_stdio.c: Include shlib-compat.h. * sunrpc/des_crypt.c, sunrpc/des_soft.c: No need to include abi-versions.h as well as shlib-compat.h. * sunrpc/get_myaddr.c: Remove obsolete comment. * sunrpc/pmap_rmt.c: Remove obsolete comment and #undef. * sunrpc/rpc_thread.c: Include libc-lock.h only once. * resolv/res_libc.c: Include shlib-compat.h only once.
* Make sunrpc code usable againAndreas Jaeger2012-05-101-1/+1
| | | | | | | | 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.
* Obsolete RPC implementation in libc.Ulrich Drepper2011-04-161-1/+2
|
* Once again change RPC copyright notices.Ulrich Drepper2010-08-191-24/+25
| | | | According to email from Wim Coekaerts.
* Revert "Sun agreed to a change of the license for the RPC code to a BSD-like ↵Ulrich Drepper2010-06-271-24/+24
| | | | | | | | | license." This reverts commit ab09b221594f12d90a63d29cbf5488d91f39d3f3. The lawyers now say the copy in glibc isn't contained in the agreement.
* Sun agreed to a change of the license for the RPC code to a BSD-like license.Ulrich Drepper2009-05-201-24/+24
|
* 2002-08-05 Jakub Jelinek <jakub@redhat.com>Roland McGrath2002-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/wchar.h (wcrtomb, wcscmp, wcsftime, wcsspn, wcschr, wcscoll, wcspbrk): Add libc_hidden_proto. * time/strftime.c (my_strftime): Add libc_hidden_def. (strftime): Remove libc_hidden_def. * wcsmbs/wcschr.c (wcschr): Add libc_hidden_def. * wcsmbs/wcspbrk.c (wcspbrk): Likewise. * wcsmbs/wcsspn.c (wcsspn): Likewise. * wcsmbs/wcscmp.c (wcscmp): Likewise. * wcsmbs/wcrtomb.c (wcrtomb): Add libc_hidden_weak. * wcsmbs/wcscoll.c (wcscoll): Likewise. * include/rpc/rpc.h (__rpc_thread_svc_max_pollfd, __rpc_thread_svc_pollfd, __rpc_thread_svc_fdset, __rpc_thread_createerr): Add libc_hidden_proto. * sunrpc/rpc_thread.c (__rpc_thread_svc_max_pollfd, __rpc_thread_svc_pollfd, __rpc_thread_svc_fdset, __rpc_thread_createerr): Add libc_hidden_def. * include/rpc/clnt.h (clnt_sperrno, clnt_spcreateerror, clnt_perror, clnt_sperror, _rpc_dtablesize): Add libc_hidden_proto. * sunrpc/clnt_perr.c (clnt_sperrno, clnt_spcreateerror, clnt_perror, clnt_sperror): Add libc_hidden_def. * sunrpc/rpc_dtable.c (_rpc_dtablesize): Likewise. * include/rpc/des_crypt.h (des_setparity, ecb_crypt, cbc_crypt): Add libc_hidden_proto. * sunrpc/des_crypt.c (ecb_crypt, cbc_crypt): Add libc_hidden_proto. * sunrpc/des_soft.c (des_setparity): Likewise. * include/rpc/auth.h (key_encryptsession_pk, key_decryptsession_pk): Add libc_hidden_proto. * sunrpc/key_call.c (key_encryptsession_pk, key_decryptsession_pk): Add libc_hidden_def.
* Add prototype for foo.Andreas Jaeger2000-12-271-0/+2
|
* Update.Ulrich Drepper1999-04-281-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-04-28 Ulrich Drepper <drepper@cygnus.com> * argp/argp-ba.c (argp_program_bug_address): Don't initialize with 0. * argp/argp-parse.c (_argp_hang): Likewise. * argp/argp-pv.c (argp_program_version): Likewise. * argp/argp-pvh.c (argp_program_version_hook): Likewise. * inet/ether_hton.c (ether_hton, startp): Likewise. * inet/ether_ntoh.c (ether_ntoh, startp): Likewise. * inet/getnetgrent_r.c (setup, startp): Likewise. * intl/loadmsgcat.c (_nl_msg_cat_cntr): Likewise. * intl/localealias.c (string_space, string_space_act, string_space_max, nmap, maxmap): Likewise. * libio/iopopen.c (proc_file_chain): Likewise. * libio/oldiopopen.c (old_proc_file_chain): Likewise. * locale/lc-collate.c (__collate_table, __collate_extra, __collate_element_hash, __collate_element_strings, __collate_element_values): Likewise. * malloc/mcheck.c (mcheck_used): Likewise. * malloc/mtrace.c (added_atexit_handler): Likewise. * malloc/set-freeres.c (already_called): Likewise. * misc/getpass.c (getpass) [buf, bufsize]: Likewise. * misc/syslog.c (LogStat, LogTag): Likewise. * nss/XXX-lookup.c (DATABASE_NAME_SYMBOL): Likewise. * nss/getXXbyYY_r.c (startp): Likewise. * posix/getopt.c (optarg, __getopt_initialized): Likewise. * posix/regex.c (init_syntax_once) [done]: Likewise. (debug): Likewise. * string/strfry.c (init): Likewise. * sunrpc/svc_run.c (svc_top): Likewise. * posix/euidaccess.c (have_ids): Likewise. * sysdeps/unix/sysv/linux/poll.c (must_emulate): Likewise. * sysdeps/unix/sysv/linux/ttyname.c (__ttyname, namelen): Likewise. * time/getdate.c (getdate_err): Likewise. * time/tzfile.c (transitions, type_idxs, types, zone_names, leaps): Likewise. * time/tzset.c (old_tz, is_initialized): Likewise. * inet/getnameinfo.c (nrl_domainname): Rewrite to allow initialization of static data with zero. * signal/allocrtsig.c (init): Likewise. * string/Makefile (routines): Add strchrnul. * string/Versions [GLIBC_2.1.1]: Add strchrnul. * string/string.c: Add strchrnul prototype. * include/string.h: Add __strchrnul prototype. * sysdeps/generic/strchrnul.c: New file. * sysdeps/i386/strchrnul.S: New file. * sysdeps/i386/bits/string.c: Add strchrnul optimization. * sysdeps/i386/i486/bits/string.c: Likewise. * argp/argp-help.c (argp_args_usage): Use __strchrnul. * inet/ether_line.c (ether_line): Likewise. * nscd/nscd_conf.c (nscd_parse_file): Likewise. * nss/nsswitch.c (nss_parse_file): Likewise. * posix/execvp.c (execvp): Likewise. * posix/fnmatch.c (internal_fnmatch): Likewise. * resolv/res_hconf.c (_res_hconv_init): Likewise. * resolv/res_init.c (res_init): Likewise. * stdlib/fmtmsg.c (init): Likewise. * stdlib/getsubopt.c (getsubopt): Likewise. * catgets/catgets.c (catopen): Only allocate one memory block. (catclose): Only one free call necessary. * catgets/open_catalog.c (__open_catalog): Simplify handling of file descriptor. * ctype/ctype-extn.c: Make __toascii_l and __isascii_l alias instead of real functions. Simplify _tolower and _toupper. * grp/initgroups.c (compat_call): Remove unnecessary use of pointer variable. * iconv/gconv.h (struct gconv_info): Change data element from pointer to array of size 0. * iconv/gconv_open.c (__gconv_open): Allocate structures accordingly. * iconv/gconv_close.c (__gconv_close): Don't free data. * iconv/gconv_conf.c (add_alias): Avoid searching in tree twice to insert new alias. * iconv/gconv_db.c (add_derivation): More efficient copying. Check for error while inserting in tree. * include/time.h: Pretty print. * inet/ruserpass.c: Rewrite use of toktab to avoid string pointers in table and lots of relocations. * posix/regex.c (regerror): Rewrite use of re_error_msgid to avoid string pointers in table and lots of relocations. * intl/finddomain.c: Remove definition of strchr macro. * io/ftw.c (nftw_arr, ftw_arr): Make const. * locale/loadlocale.c (_nl_load_locale): Optimize string copying. * locale/localeinfo.h (_nl_category_names): Change into an array with fixed width char string elements. * locale/setlocale.c (_nl_category_names): Likewise. (_nl_current): Make global. * locale/nl_langinfo.c (nldata): Removed. Use _nl_current now. * malloc/Makefile (distribute): Add stackinfo.h. * sysdeps/generic/stackinfo.h: New file. * sysdeps/i386/stackinfo.h: New file. * posix/execl.c: Use stackinfo.h in optimizing alloca use. * posix/execle.c: Likewise. * posix/execlp.c: Likewise. * nis/nis_table.c (__create_ib_request): Always use realloc. * posix/execvp.c (execute): Rename to script_execute and keep only code to execute using shell. (execvp): Call execv directly and only fall back on script_execute. * resolv/inet_net_pton.c (inet_net_pton_ipv4): Remove digits define and always use xdigits instead. * resolv/res_init.c (res_init): Use rawmemchr instead of strchr where appropriate. * stdlib/fpioconst.h (__tens): New declaration. (struct mp_power): Remove array, add arrayoff element. * stdlib/fpioconst.c: Replace definitions of _ten_p* arrays by one __tens array and add in _fpioconst_pow10 offsets into __tens. * stdio-common/printf_fp.c: Rewrite to use new __tens array. * stdlib/strtod.c: Likewise. * stdlib/a64l.c (a64l_table): Avoid unnecessary elements. * stdlib/exit.c: Rewrite to use __exit_funcs being as sign for end of the list. * stdlib/atexit.c (__exit_funcs): Don't initialize. * stdlib/fmtmsg.c (keywords): Make name element fixed width array. * sunrpc/clnt_perr.c: Rewrite clnt_sperrno and auth_errmsg to use a single and an array with offsets. * sunrpc/des_soft.c (partab): Make it const. * sunrpc/key_call.c (trytimeout, tottimeout): Make const. (__key_encryptsession_pk_LOCAL): Don't initialize with 0. (__key_decryptsession_pk_LOCAL): Likewise. (__key_gendes_LOCAL): Likewise. (MESSENGER): Mark const. (key_call_private_main): Don't initialize with 0. (use_keyenvoy): Don't initialize with 0. (key_call): Rewrite to reverse logic of use_doors variable. * sunrpc/netname.c (OPSYS): Define as array, not pointer. (startp): Don't initialize with zero. * sunrpc/openchild.c (_openchild): Make first argument const. * sunrpc/pmap_rmt.c (timeout): Mark const. * sunrpc/xcrypt.c (hex): Likewise. * sysdeps/unix/sysv/linux/getcwd.c: Rewrite to allow omitting initialization of global variables. * sysdeps/unix/sysv/linux/getpt.c: Likewise. * sysdeps/unix/sysv/linux/if_index.c: Likewise. * termios/tcgetsid.c: Likewise. * sysdeps/unix/sysv/linux/i386/dl-procinfo.h (x86_cap_flags): Change fxsr to osfxsr. * time/tzfile.c (__tzfile_read): Rewrite to allocate only one memory block. Add function to free memory if wanted. * time/tzset.c (tzset_internal): Pass extra argument to __tzfile_read. * wcsmbs/wcsmbsload.c (to_wc, to_mb): Correct initializers. * wcsmbs/wmemset.c: Little code optimization.
* Update. cvs/libc-ud-970829Ulrich Drepper1997-08-291-0/+68
1997-08-29 21:45 Ulrich Drepper <drepper@cygnus.com> * sunrpc/auth_des.c: New file. Copied from former secure_rpc add-on. * sunrpc/authdes_prot.c: New file. Likewise. * sunrpc/des.h: New file. Likewise. * sunrpc/des_crypt.c: New file. Likewise. * sunrpc/des_soft.c: New file. Likewise. * sunrpc/key_call.c: New file. Likewise. * sunrpc/key_prot.c: New file. Likewise. * sunrpc/netname.c: New file. Likewise. * sunrpc/openchild.c: New file. Likewise. * sunrpc/rtime.c: New file. Likewise. * sunrpc/svc_auth.c: New file. Likewise. * sunrpc/svcauth_des.c: New file. Likewise. * sunrpc/xcrypt.c: New file. Likewise. * sunrpc/rpc/auth.h: New file. Likewise. * sunrpc/rpc/auth_des.h: New file. Likewise. * sunrpc/rpc/des_crypt.h: New file. Likewise. * sunrpc/rpc/key_prot.h: New file. Likewise. * sunrpc/rpcsvc/key_prot.x: New file. Likewise. * sysdeps/generic/svc_auth.h: Removed. * sysdeps/generic/rpc/auth.h: Removed. * sysdeps/generic/rpc/auth_des.h: Removed. * sysdeps/stub/des_impl.c: New file. Stub version for DES. * sunrpc/Makefile (rpcsvc): Add keyprot.x. (headers): Add des_crypt.h and key_prot.h. (routines): Add auth_des, authdes_prot, des_crypt, des_impl, des_soft, key_call, key_prot, netname, openchild, rtime, svcauth_des, xcrypt. (distribute): Add des.h. * db2/Makefile: Add all headers and other files to distribute. (others): Add db_printlog. * sysdeps/mach/hurd/Dist: Add net/* headers. * sysdeps/mach/hurd/mips/Dist: New file. * sysdeps/powerpc/Dist: Add fe_nomask.c and t_sqrt.c. * sysdeps/sparc/Dist: Add sys/trap.h. * sysdeps/sparc/sparc32/Dist: Remove sys/trap.h. * sysdeps/sparc/sparc32/sparcv8/Dist: New file. * sysdeps/unix/sysv/linux/mips/Dist: Add sgidefs.h. * sysdeps/unix/sysv/linux/sparc/Dist: Add sys/trap.h. * sysdeps/unix/sysv/linux/sparc/sparc32/Dist: Remove sys/trap.h. Add previously missing assembler files for PPC. * sysdeps/powerpc/add_n.s: New file. * sysdeps/powerpc/addmul_1.s: New file. * sysdeps/powerpc/lshift.s: New file. * sysdeps/powerpc/memset.s: New file. * sysdeps/powerpc/mul_1.s: New file. * sysdeps/powerpc/rshift.s: New file. * sysdeps/powerpc/strchr.s: New file. * sysdeps/powerpc/strcmp.s: New file. * sysdeps/powerpc/sub_n.s: New file. * sysdeps/powerpc/submul_1.s: New file. 1997-08-28 18:42 Thorsten Kukuk <kukuk@uni-paderborn.de> * nis/nis_server.c: Rewritten to fix a lot of bugs. 1997-08-28 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * md5-crypt/Makefile (LDFLAGS-md5crypt.so, libmd5crypt-map): New variables. in NLSPATH environment variable. Patch by HJ Lu <hjl@gnu.ai.mit.edu>.