Age | Commit message (Collapse) | Author |
|
* gl/lib/argv-iter.h (_ATTRIBUTE_NONNULL_): Don't assume C99 variadic
macros are portable yet; needed for at least IRIX/MIPSpro.
* THANKS: Update.
Reported by Stuart Shelton.
|
|
* gl/lib/mgetgroups.c: Avoid -Wsign-compare warning by using unsigned
types for the parameters of the new function realloc_groupbuf().
mgetgroups() was refactored to use this function rather than
explicitly allocating and copying from automatic storage itself.
* src/group-list.c: Use int rather than size_t as variable is
used in signed comparisons.
* src/id.c: ditto.
|
|
* configure.ac: Add quotes.
* gl/m4/mgetgroups.m4 (gl_MGETGROUPS): Likewise.
* m4/boottime.m4 (GNULIB_BOOT_TIME): Likewise.
* m4/check-decl.m4 (gl_CHECK_DECLS): Likewise.
* m4/gmp.m4 (cu_GMP): Likewise.
* m4/jm-macros.m4 (coreutils_MACROS, gl_CHECK_ALL_HEADERS): Likewise.
(gl_CHECK_ALL_TYPES): Likewise.
* m4/lib-check.m4 (cu_LIB_CHECK): Likewise.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Likewise.
FYI, I first ran this command:
git ls-files | grep -E '\.(m4|ac)$' | xargs perl -pi \
-e 's/(AC_[A-Z_]+\()([^[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_[A-Z_]+\(\[[^,]+?\], )([^,[()]+?)([,)])/$1\[$2]$3/g;' \
-e 's/(AC_[A-Z_]+\((?:\[[^,]+?\], ){2})([^,[()]+?)([,)])/$1\[$2]$3/g'
Then I updated serial numbers and copyright dates manually.
Also, I manually added two pairs of quotes in boottime.m4.
|
|
* gl/modules/argv-iter-tests: New module.
* gl/tests/test-argv-iter.c: New file.
|
|
* gl/lib/argv-iter.h: New file.
* gl/lib/argv-iter.c: New file.
* gl/modules/argv-iter: New file.
With a suggestion for improved memory management by Pádraig Brady.
|
|
* gl/lib/xfreopen.c: New file.
* gl/lib/xfreopen.h: New file.
* gl/modules/xfreopen: New file.
|
|
* gl/modules/selinux-at:
Ensure that LIB_SELINUX is cleared, in case it's set in the environment.
m4-quote the first two args to AC_SEARCH_LIBS.
Don't violate autoconf's ac_ namespace: s/ac_save/gl_save/
Drop the useless double quotes around a simple assignment RHS.
|
|
* gl/lib/se-context.in.h: Remove file.
* gl/lib/se-selinux.in.h: Likewise.
* gl/m4/selinux-context-h.m4: Likewise.
* gl/m4/selinux-selinux-h.m4: Likewise.
* gl/modules/selinux-h: Likewise.
|
|
* gl/modules/selinux-h (Makefile.am)
[selinux/selinux.h, selinux/context.h]:
Remove temporary file and target, in case they're read-only.
Use $(MKDIR_P), not mkdir -p.
(License): Relax to LGPLv2+.
Remove vestigial comments.
|
|
* src/copy.c: Don't include "euidaccess.h" or "lchmod.h".
* src/cp.c: Don't include "lchmod.h".
* src/ls.c: Don't include "dirfd.h".
* src/mkdir.c: Don't include "lchmod.h".
* src/pwd.c: Don't include "dirfd.h".
* src/remove.c: Don't include "dirfd.h" or "euidaccess.h".
* src/test.c: Don't include "euidaccess.h".
* gl/modules/getloadavg.diff: Adjust diff for changed context.
* src/uptime.c (uptime): Remove declaration.
|
|
* gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Remove definition.
It is already defined there. Reported by Eric Blake.
|
|
* m4/jm-macros.m4: Check for matchpathcon_init_prefix.
* src/install.c [!HAVE_MATCHPATHCON_INIT_PREFIX]
(matchpathcon_init_prefix): Define away.
* gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Define.
Reported by Ilya N. Golubev in
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13686>.
|
|
* gl/lib/base64.c: Remove file.
* gl/lib/base64.h: Remove file.
|
|
* bootstrap.conf (gnulib_modules) [sha256, sha512]: Add "crypto/"
prefix to module name, now that they come from gnulib.
* gl/lib/sha256.c: Remove file.
* gl/lib/sha256.h: Likewise.
* gl/lib/sha512.c: Likewise.
* gl/lib/sha512.h: Likewise.
* gl/lib/u64.h: Likewise.
* gl/m4/sha256.m4: Likewise.
* gl/m4/sha512.m4: Likewise.
* gl/modules/sha256: Likewise.
* gl/modules/sha512: Likewise.
|
|
* gl/lib/base64.c (base64_decode_ctx): If no context structure was passed in,
treat newlines as garbage (this is the historical behavior). Formerly
base64_decode.
(base64_decode_alloc_ctx): Formerly base64_decode_alloc.
* gl/lib/base64.h (base64_decode): Macro for four-argument calls.
(base64_decode_alloc): Likewise.
* src/base64.c (do_decode): Call base64_decode_ctx instead of base64_decode.
Signed-off-by: Bo Borgerson <gigabo@gmail.com>
|
|
* gl/lib/sha512.c (sha512_process_bytes): s/63/127/.
|
|
* gl/lib/sha256.h (SHA224_DIGEST_SIZE, SHA256_DIGEST_SIZE): Define.
* gl/lib/sha512.h (SHA384_DIGEST_SIZE, SHA512_DIGEST_SIZE): Define.
|
|
* bootstrap.conf (gnulib_modules): Add sha256 and sha512.
* m4/prereq.m4: Don't require gl_SHA256 or gl_SHA512.
* gl/modules/sha512: New file.
* gl/modules/sha256: New file.
* m4/sha256.m4: Move to ...
* gl/m4/sha256.m4: ...here, removing use of AC_SOURCES.
* m4/sha512.m4: Move to ...
* gl/m4/sha512.m4: ...here, removing use of AC_SOURCES.
* lib/sha256.c, lib/sha256.h: Move to ...
* gl/lib/sha256.c, gl/lib/sha256.h: ...here.
* lib/sha512.c, lib/sha512.h: Move to ...
* gl/lib/sha512.c, gl/lib/sha512.h: ...here.
* lib/u64.h: Move to ...
* gl/lib/u64.h: ...here.
|
|
* bootstrap.conf (obsolete_gnulib_modules): Remove free.
* gl/modules/mgetgroups (Depends-on): Remove free.
|
|
|
|
|
|
* gl/lib/mgetgroups.c (mgetgroups) [N_GROUPS_INIT]: Rename enum.
Use a larger value.
Update *groups only upon success.
Iterate upon failed getgrouplist.
|
|
* gl/m4/mgetgroups.m4: Check for getgrouplist.
* gl/lib/mgetgroups.c (mgetgroups): Use getgrouplist, if available.
* TODO: Remove the item about switching to getgrouplist.
* NEWS: mention this
|
|
* src/system.h (__attribute__): Remove the __STRICT_ANSI__ disjunct.
It has been unnecessary since approximately gcc-2.6, and now, leaving
it would cause gcc -Werror -ansi to fail to compile csplit.c.
* gl/lib/randread.c (__attribute__): Likewise.
|
|
|
|
* 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>
|
|
* gl/lib/se-context.in.h (ENOTSUP): Define if missing.
* gl/lib/se-selinux.in.h: Likewise.
|
|
* 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.
|
|
* 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>
|
|
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.
|
|
* 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
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
* 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>
|
|
|
|
|
|
|
|
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.
|
|
|
|
* 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.
|
|
is now in gnulib. The other wasn't useful.
|
|
|
|
* 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.
|
|
* gl/lib/acl.c: New file, copied from gnulib.
|
|
* 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
|
|
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.
|
|
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.
|
|
* gl/lib/base64.h: Likewise.
|
|
remove the now-unnecessary use of AC_LIBSOURCES.
|