summaryrefslogtreecommitdiff
path: root/gl
AgeCommit message (Collapse)Author
2007-11-28* gl/modules/randread (Depends-on): Remove nonexistent rand-isaac.Paul Eggert
2007-11-10install+SELinux: reduce a 12x performance hit to ~1.5xJim Meyering
* src/install.c (setdefaultfilecon): Call matchpathcon_init_prefix, to mitigate what would otherwise be a large performance hit due to the use of matchpathcon. Dan Walsh suggested the use of matchpathcon_init_prefix. * gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Define. Signed-off-by: Jim Meyering <meyering@redhat.com>
2007-10-28Define ENOTSUP, not ENOSYS. Needed on OpenBSD 3.9.Jim Meyering
* gl/lib/se-context.in.h (ENOTSUP): Define if missing. * gl/lib/se-selinux.in.h: Likewise.
2007-10-07Reflect 2->3 GPL copyright version update in gnulib.Jim Meyering
* gl/lib/tempname.h: Update copyright from gnulib. * gl/lib/tempname.c: Likewise. * .x-sc_GPL_version: Don't make an exception for those two files.
2007-10-07Make tempname more random, via the randint module.Jim Meyering
* gl/modules/tempname (Depends-on): Add randint and stdbool. * gl/lib/tempname.c: Include randint.h and stdbool.h. (uint64_t): Remove definition. Not needed. [_LIBC] (RANDOM_BITS): Remove this block, now that we have proper random bits. (check_x_suffix): New function. (gen_tempname_len): Rename from __gen_tempname. Add a parameter, x_suffix_len, telling how many X's there must be at the end of the template. Use pseudo-random numbers all the way, rather than adding 7777 from one iteration to the next. (__gen_tempname): New function, to call gen_tempname_len, requiring a suffix length of 6. * gl/lib/tempname.h: Add prototype for gen_tempname_len. Signed-off-by: Jim Meyering <meyering@redhat.com>
2007-10-07Convert coreutils' rand*.{c,h,m4} into modules.Jim Meyering
First step: move these files to gl/lib: * lib/rand-isaac.c, lib/rand-isaac.h * lib/randint.c, lib/randint.h * lib/randperm.c, lib/randperm.h * lib/randread.c, lib/randread.h Step 2: add modules/rand* and remove now-unneeded .m4 files. * gl/modules/randint: New file. * gl/modules/randperm: New file. * gl/modules/randread: New file. * m4/randint.m4: Remove file. * m4/randperm.m4: Remove file. * m4/randread.m4: Remove file. Step 3: use the new modules * bootstrap.conf (gnulib_modules): Add randint and randperm. * m4/prereq.m4 (gl_RANDINT, gl_RANDREAD, gl_RANDPERM): Don't require; These have been removed. (gl_ROOT_DEV_INO): Don't require; already handled via bootstrap.conf.
2007-10-07Copy from gnulib the parts of tempname that we'll modify.Jim Meyering
* gl/lib/tempname.c: Copy from gnulib. * gl/lib/tempname.h: Likewise. * gl/modules/tempname: Likewise. Allow GPLv2 on temporarily(?)-imported file from gnulib/libc. * .x-sc_GPL_version: New file. * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version
2007-10-04Adapt to new gnulib naming scheme.Jim Meyering
* gl/lib/se-context.in.h: Rename from gl/lib/se-context_.h. * gl/lib/se-selinux.in.h: Rename from gl/lib/se-selinux_.h. * gl/m4/selinux-context-h.m4: Remove use of AC_LIBSOURCES. * gl/m4/selinux-selinux-h.m4: Likewise. * gl/modules/selinux-h (Files, Makefile.am): Reflect renaming. (Makefile.am) [lib_SOURCES]: Add se-context.in.h and se-selinux.in.h.
2007-09-27Move file-set and hash-triple modules to gnulib.Jim Meyering
* bootstrap.conf (gnulib_modules): Remove file-set, now that it's in gnulib, and the canonicalize module requires it there. * gl/lib/file-set.c, gl/lib/file-set.h, gl/modules/hash-triple: Remove. * gl/lib/hash-triple.c, gl/lib/hash-triple.h, gl/modules/file-set: Remove.
2007-09-25Use XOR, not OR to combine bits.Jim Meyering
* gl/lib/hash-triple.c (triple_hash): Use XOR (^), not OR (|), to combine the bits from hashing the name and those of the inode number. Add a few comments and remove out-of-context ones.
2007-08-23Move functions from copy.c into new modules, since ln needs them, too.Jim Meyering
* bootstrap.conf (gnulib_modules): Add file-set. * gl/lib/file-set.c (record_file, seen_file): Functions from copy.c. * gl/lib/file-set.h: Add prototypes. * gl/lib/hash-triple.c (triple_hash, triple_hash_no_name): (triple_compare, triple_free): Functions from copy.c. * gl/lib/hash-triple.h (struct F_triple): Define. From copy.c. Add prototypes. * gl/modules/file-set: New module. * gl/modules/hash-triple: New module. * src/Makefile.am (copy_sources): New variable. (ginstall_SOURCES, cp_SOURCES, mv_SOURCES): Use it. * src/copy.c: Include hash-triple.h. No longer include hash-pjw.h. (copy_internal): Don't pass a NULL third argument to record_file, since that function no longer accepts that. (record_file): Move this function to file-set.c. Along the way, remove the code to allow a NULL stat-buffer pointer. Adjust sole caller. (seen_file): Move this function to file-set.c. (struct F_triple): Move declaration to hash-triple.h. (triple_compare, triple_free, triple_hash, triple_hash_no_name): Move these functions to hash-triple.c. Signed-off-by: Jim Meyering <jim@meyering.net>
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering
2007-07-07Fix typo in comment.Jim Meyering
2007-07-06setuidgid: set all groups, not just the primary one; mgetgroups: new moduleJim Meyering
I wanted to use the xgetgroups function from id.c, so factored it out and made it into a non-exiting function (hence the "m" prefix rather than "x"). * src/setuidgid.c (main): Use mgetgroups. Include "mgetgroups.h". * src/id.c (xgetgroups): Remove function. Include "mgetgroups.h". (print_group_list): Use mgetgroups, not xgetgroups. * gl/modules/mgetgroups: New module. * gl/lib/mgetgroups.c: New file. mgetgroups is derived from id.c's xgetgroups function. * bootstrap.conf (gnulib_modules): Add mgetgroups. * gl/m4/mgetgroups.m4: New file. * gl/lib/mgetgroups.h: New file.
2007-03-29* gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.Jim Meyering
2007-03-29New program: chconJim Meyering
* gl/modules/selinux-at: New module. Check for libselinux and set LIB_SELINUX here, unconditionally, rather than depending on the configure-time --enable-selinux option. * gl/modules/selinux-h: New module. * bootstrap.conf (gnulib_modules): Add selinux-at. * gl/lib/selinux-at.c, gl/lib/selinux-at.h: New files. * gl/lib/se-selinux_.h: New file. * gl/lib/se-context_.h: New file. * gl/m4/selinux-selinux-h.m4: New file. * gl/m4/selinux-context-h.m4: New file. * src/Makefile.am (bin_PROGRAMS): Add chcon. (chcon_LDADD): Define. * README: Add chcon to the list of programs. * src/chcon.c: Rewrite the original (Red Hat) chcon to use fts.
2007-03-21* gl/lib/savewd.c: Remove this file, since the savewd_save changeJim Meyering
is now in gnulib. The other wasn't useful.
2007-03-20* gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.Jim Meyering
2007-03-16Begin adding support for Solaris ZFS (4 entries per trivial ACL)Jim Meyering
* gl/lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro. (file_has_acl, copy_acl): Use it, rather than enumerating errno values. (is_trivial_acl): New function. Incomplete, for now. (file_has_acl, copy_acl): Use the new function, rather than counting the number of entries in an ACL.
2007-03-13Prepare to work on ACL-related failure when using Solaris ZFS.Jim Meyering
* gl/lib/acl.c: New file, copied from gnulib.
2007-03-10Try to fix today's NFS-related failure: Treat ESTALE like EACCES.Jim Meyering
* gl/lib/savewd.c: Copy this file from gnulib, then change "errno != EACCES" to (errno != EACCES && errno != ESTALE). The symptom was this failure in tests/install/basic-1: ginstall: cannot create directory `rel/a': Stale NFS file handle
2007-01-05Avoid a used-uninitialized bug for invalid input, i.e., when the sizeJim Meyering
of the input, not counting newlines, is 1 % 4. * gl/lib/base64.c (base64_decode): Don't hard-code inlen==4. It may be smaller when flushing.
2007-01-04[ChangeLog]Jim Meyering
When decoding, always allow newlines in input, with almost no performance impact. * src/base64.c (do_decode): Initialize decode context. Call base64_decode one more time, after all input is processed. (usage): When decoding, newlines are always accepted. * tests/misc/base64: Add a bunch of tests, for the above. * gl/lib/base64.c: Include <string.h>. (base64_decode_ctx_init, get_4, decode_4): New functions. (base64_decode): Efficiently handle interspersed newlines. (base64_decode_alloc): Update signature. * gl/lib/base64.h (struct base64_decode_context): Define. (base64_decode_ctx_init): Add prototype. (base64_decode, base64_decode_alloc): Update prototypes. [doc/ChangeLog] * coreutils.texi (base64 invocation): When decoding, newlines are always accepted.
2007-01-04* gl/lib/base64.c: Copied from gnulib.Jim Meyering
* gl/lib/base64.h: Likewise.
2006-11-14* gl/m4/root-dev-ino.m4: Now that this is part of a real "module",Jim Meyering
remove the now-unnecessary use of AC_LIBSOURCES.
2006-11-14Adapt to new version of gnulib-tool.Jim Meyering
* gl/modules/root-dev-ino: New file. * lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ... * gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here. * m4/root-dev-ino.m4: Move this file ... * gl/m4/root-dev-ino.m4: ... to here. * bootstrap.conf (gnulib_modules): Add root-dev-ino.
2006-09-23remove trailing blanksJim Meyering
2006-09-23* gl/modules/getloadavg.diff: New file. Work around the way the latestJim Meyering
version of the getloadavg module interacts with our bootstrap script. * bootstrap (gnulib_tool_options): Add "--local-dir gl".