Compare commits
12 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71510bd605 | ||
|
|
f28f512e31 | ||
|
|
12226c563d | ||
|
|
e496961922 | ||
|
|
2799d996f6 | ||
|
|
c46649f534 | ||
|
|
75b71596fc | ||
|
|
851fdcd87c | ||
|
|
84ce36b59c | ||
|
|
769f191019 | ||
|
|
8724b4e49e | ||
|
|
c7a8b3346b |
55 changed files with 7594 additions and 5759 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,2 +1 @@
|
|||
/coreutils-[0-9.]*.tar.xz
|
||||
/coreutils-[0-9.]*.tar.xz.sig
|
||||
coreutils-7.6.tar.xz
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
srpm coreutils
|
||||
mcd $BUILDDIR/$1
|
||||
(cd $SRC/${1}-*/ ; autoreconf -vif)
|
||||
$SRC/${1}-*/configure $TCONFIGARGS --disable-pam
|
||||
notparallel
|
||||
make $J man1_MANS= V=1
|
||||
make $J man1_MANS= install DESTDIR=${ROOTFS}
|
||||
18
coreutils-4.5.3-langinfo.patch
Normal file
18
coreutils-4.5.3-langinfo.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
--- coreutils-5.92/src/date.c.langinfo 2005-09-16 09:06:57.000000000 +0100
|
||||
+++ coreutils-5.92/src/date.c 2005-10-24 18:09:16.000000000 +0100
|
||||
@@ -451,14 +451,7 @@
|
||||
format = DATE_FMT_LANGINFO ();
|
||||
if (! *format)
|
||||
{
|
||||
- /* Do not wrap the following literal format string with _(...).
|
||||
- For example, suppose LC_ALL is unset, LC_TIME="POSIX",
|
||||
- and LANG="ko_KR". In that case, POSIX says that LC_TIME
|
||||
- determines the format and contents of date and time strings
|
||||
- written by date, which means "date" must generate output
|
||||
- using the POSIX locale; but adding _() would cause "date"
|
||||
- to use a Korean translation of the format. */
|
||||
- format = "%a %b %e %H:%M:%S %Z %Y";
|
||||
+ format = dcgettext(NULL, N_("%a %b %e %H:%M:%S %Z %Y"), LC_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
72
coreutils-4.5.3-sysinfo.patch
Normal file
72
coreutils-4.5.3-sysinfo.patch
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
--- coreutils-5.97/src/uname.c.sysinfo 2005-09-15 20:57:04.000000000 +0100
|
||||
+++ coreutils-5.97/src/uname.c 2006-08-24 17:15:56.000000000 +0100
|
||||
@@ -263,7 +263,7 @@
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
- static char const unknown[] = "unknown";
|
||||
+ static char unknown[] = "unknown";
|
||||
|
||||
/* Mask indicating which elements to print. */
|
||||
unsigned int toprint = 0;
|
||||
@@ -306,13 +306,35 @@
|
||||
|
||||
if (toprint & PRINT_PROCESSOR)
|
||||
{
|
||||
- char const *element = unknown;
|
||||
+ char *element = unknown;
|
||||
#if HAVE_SYSINFO && defined SI_ARCHITECTURE
|
||||
{
|
||||
static char processor[257];
|
||||
if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
|
||||
element = processor;
|
||||
}
|
||||
+#else
|
||||
+ {
|
||||
+ struct utsname u;
|
||||
+ uname(&u);
|
||||
+ element = u.machine;
|
||||
+#ifdef linux
|
||||
+ if(!strcmp(element, "i686")) { /* Check for Athlon */
|
||||
+ char cinfo[1024];
|
||||
+ FILE *f=fopen("/proc/cpuinfo", "r");
|
||||
+ if(f) {
|
||||
+ while(fgets(cinfo, 1024, f)) {
|
||||
+ if(!strncmp(cinfo, "vendor_id", 9)) {
|
||||
+ if(strstr(cinfo, "AuthenticAMD"))
|
||||
+ element="athlon";
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ fclose(f);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+ }
|
||||
#endif
|
||||
#ifdef UNAME_PROCESSOR
|
||||
if (element == unknown)
|
||||
@@ -348,7 +370,7 @@
|
||||
|
||||
if (toprint & PRINT_HARDWARE_PLATFORM)
|
||||
{
|
||||
- char const *element = unknown;
|
||||
+ char *element = unknown;
|
||||
#if HAVE_SYSINFO && defined SI_PLATFORM
|
||||
{
|
||||
static char hardware_platform[257];
|
||||
@@ -356,6 +378,14 @@
|
||||
hardware_platform, sizeof hardware_platform))
|
||||
element = hardware_platform;
|
||||
}
|
||||
+#else
|
||||
+ {
|
||||
+ struct utsname u;
|
||||
+ uname(&u);
|
||||
+ element = u.machine;
|
||||
+ if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6')
|
||||
+ element[1]='3';
|
||||
+ }
|
||||
#endif
|
||||
#ifdef UNAME_HARDWARE_PLATFORM
|
||||
if (element == unknown)
|
||||
383
coreutils-5.2.1-runuser.patch
Normal file
383
coreutils-5.2.1-runuser.patch
Normal file
|
|
@ -0,0 +1,383 @@
|
|||
diff -urNp coreutils-7.0.orig/AUTHORS coreutils-7.0/AUTHORS
|
||||
--- coreutils-7.0.orig/AUTHORS 2008-08-24 22:58:15.000000000 +0200
|
||||
+++ coreutils-7.0/AUTHORS 2009-01-28 18:11:00.316247411 +0100
|
||||
@@ -64,6 +64,7 @@ pwd: Jim Meyering
|
||||
rm: Paul Rubin, David MacKenzie, Richard M. Stallman, Jim Meyering
|
||||
rmdir: David MacKenzie
|
||||
runcon: Russell Coker
|
||||
+runuser: David MacKenzie, Dan Walsh
|
||||
seq: Ulrich Drepper
|
||||
sha1sum: Ulrich Drepper, Scott Miller, David Madore
|
||||
sha224sum: Ulrich Drepper, Scott Miller, David Madore
|
||||
diff -urNp coreutils-7.0.orig/man/Makefile.am coreutils-7.0/man/Makefile.am
|
||||
--- coreutils-7.0.orig/man/Makefile.am 2008-09-27 19:28:54.000000000 +0200
|
||||
+++ coreutils-7.0/man/Makefile.am 2009-01-28 18:11:00.317247417 +0100
|
||||
@@ -93,6 +93,7 @@ readlink.1: $(common_dep) $(srcdir)/read
|
||||
rm.1: $(common_dep) $(srcdir)/rm.x ../src/rm.c
|
||||
rmdir.1: $(common_dep) $(srcdir)/rmdir.x ../src/rmdir.c
|
||||
runcon.1: $(common_dep) $(srcdir)/runcon.x ../src/runcon.c
|
||||
+runuser.1: $(common_dep) $(srcdir)/runuser.x ../src/su.c
|
||||
seq.1: $(common_dep) $(srcdir)/seq.x ../src/seq.c
|
||||
sha1sum.1: $(common_dep) $(srcdir)/sha1sum.x ../src/md5sum.c
|
||||
sha224sum.1: $(common_dep) $(srcdir)/sha224sum.x ../src/md5sum.c
|
||||
diff -urNp coreutils-7.0.orig/man/runuser.x coreutils-7.0/man/runuser.x
|
||||
--- coreutils-7.0.orig/man/runuser.x 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ coreutils-7.0/man/runuser.x 2009-01-28 18:11:00.321247443 +0100
|
||||
@@ -0,0 +1,12 @@
|
||||
+[NAME]
|
||||
+runuser \- run a shell with substitute user and group IDs
|
||||
+[DESCRIPTION]
|
||||
+.\" Add any additional description here
|
||||
+[SEE ALSO]
|
||||
+.TP
|
||||
+More detailed Texinfo documentation could be found by command
|
||||
+.TP
|
||||
+\t\fBinfo coreutils \(aqsu invocation\(aq\fR\t
|
||||
+.TP
|
||||
+since the command \fBrunuser\fR is trimmed down version of command \fBsu\fR.
|
||||
+.br
|
||||
diff -urNp coreutils-7.0.orig/README coreutils-7.0/README
|
||||
--- coreutils-7.0.orig/README 2008-08-24 22:30:10.000000000 +0200
|
||||
+++ coreutils-7.0/README 2009-01-28 18:11:00.318247424 +0100
|
||||
@@ -12,10 +12,10 @@ The programs that can be built with this
|
||||
factor false fmt fold groups head hostid hostname id install join kill
|
||||
link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup
|
||||
od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir
|
||||
- runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf
|
||||
- sleep sort split stat stdbuf stty su sum sync tac tail tee test timeout
|
||||
- touch tr true truncate tsort tty uname unexpand uniq unlink uptime users
|
||||
- vdir wc who whoami yes
|
||||
+ runcon runuser seq sha1sum sha224sum sha256sum sha384sum sha512sum shred
|
||||
+ shuf sleep sort split stat stdbuf stty su sum sync tac tail tee test
|
||||
+ timeout touch tr true truncate tsort tty uname unexpand uniq unlink uptime
|
||||
+ users vdir wc who whoami yes
|
||||
|
||||
See the file NEWS for a list of major changes in the current release.
|
||||
|
||||
diff -urNp coreutils-7.0.orig/src/Makefile.am coreutils-7.0/src/Makefile.am
|
||||
--- coreutils-7.0.orig/src/Makefile.am 2009-01-28 18:10:10.756926000 +0100
|
||||
+++ coreutils-7.0/src/Makefile.am 2009-01-28 18:11:59.658631933 +0100
|
||||
@@ -38,7 +38,7 @@ EXTRA_PROGRAMS = \
|
||||
shuf sort split sum tac tail tr tsort unexpand uniq wc \
|
||||
basename date dirname echo env expr factor false \
|
||||
id kill logname pathchk printenv printf pwd \
|
||||
- runcon seq sleep tee \
|
||||
+ runcon runuser seq sleep tee \
|
||||
test timeout true truncate tty whoami yes \
|
||||
base64
|
||||
|
||||
@@ -154,6 +154,10 @@ cp_LDADD += $(LIB_ACL) $(LIB_XATTR)
|
||||
mv_LDADD += $(LIB_ACL) $(LIB_XATTR)
|
||||
ginstall_LDADD += $(LIB_ACL) $(LIB_XATTR)
|
||||
|
||||
+runuser_SOURCES = su.c
|
||||
+runuser_CFLAGS = -DRUNUSER -DAUTHORS="\"David MacKenzie, Dan Walsh\""
|
||||
+runuser_LDADD = $(LDADD) $(LIB_CRYPT) @LIB_PAM@
|
||||
+
|
||||
stat_LDADD = $(LDADD) $(LIB_SELINUX)
|
||||
|
||||
# Append $(LIBICONV) to each program that uses proper_name_utf8.
|
||||
@@ -173,7 +177,7 @@ RELEASE_YEAR = \
|
||||
`sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \
|
||||
$(top_srcdir)/lib/version-etc.c`
|
||||
|
||||
-all-local: su$(EXEEXT)
|
||||
+all-local: su$(EXEEXT) runuser
|
||||
|
||||
installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'`
|
||||
|
||||
diff -urNp coreutils-7.0.orig/src/su.c coreutils-7.0/src/su.c
|
||||
--- coreutils-7.0.orig/src/su.c 2009-01-28 18:10:10.801926000 +0100
|
||||
+++ coreutils-7.0/src/su.c 2009-01-28 18:11:00.320247437 +0100
|
||||
@@ -109,9 +109,15 @@
|
||||
#include "error.h"
|
||||
|
||||
/* The official name of this program (e.g., no `g' prefix). */
|
||||
+#ifndef RUNUSER
|
||||
#define PROGRAM_NAME "su"
|
||||
+#else
|
||||
+#define PROGRAM_NAME "runuser"
|
||||
+#endif
|
||||
|
||||
+#ifndef AUTHORS
|
||||
#define AUTHORS proper_name ("David MacKenzie")
|
||||
+#endif
|
||||
|
||||
#if HAVE_PATHS_H
|
||||
# include <paths.h>
|
||||
@@ -149,6 +155,10 @@
|
||||
#ifndef USE_PAM
|
||||
char *crypt (char const *key, char const *salt);
|
||||
#endif
|
||||
+#ifndef CHECKPASSWD
|
||||
+#define CHECKPASSWD 1
|
||||
+#endif
|
||||
+
|
||||
char *getusershell (void);
|
||||
void endusershell (void);
|
||||
void setusershell (void);
|
||||
@@ -156,7 +166,11 @@ void setusershell ();
|
||||
extern char **environ;
|
||||
|
||||
static void run_shell (char const *, char const *, char **, size_t,
|
||||
- const struct passwd *)
|
||||
+ const struct passwd *
|
||||
+#ifdef RUNUSER
|
||||
+ , gid_t *groups, int num_groups
|
||||
+#endif
|
||||
+ )
|
||||
#ifdef USE_PAM
|
||||
;
|
||||
#else
|
||||
@@ -183,6 +197,10 @@ static struct option const longopts[] =
|
||||
{"login", no_argument, NULL, 'l'},
|
||||
{"preserve-environment", no_argument, NULL, 'p'},
|
||||
{"shell", required_argument, NULL, 's'},
|
||||
+#ifdef RUNUSER
|
||||
+ {"group", required_argument, NULL, 'g'},
|
||||
+ {"supp-group", required_argument, NULL, 'G'},
|
||||
+#endif
|
||||
{GETOPT_HELP_OPTION_DECL},
|
||||
{GETOPT_VERSION_OPTION_DECL},
|
||||
{NULL, 0, NULL, 0}
|
||||
@@ -284,10 +302,12 @@ correct_password (const struct passwd *p
|
||||
retval = pam_start(PROGRAM_NAME, pw->pw_name, &conv, &pamh);
|
||||
PAM_BAIL_P;
|
||||
|
||||
+#ifndef RUNUSER
|
||||
if (getuid() != 0 && !isatty(0)) {
|
||||
fprintf(stderr, "standard in must be a tty\n");
|
||||
exit(1);
|
||||
}
|
||||
+#endif
|
||||
|
||||
caller = getpwuid(getuid());
|
||||
if(caller != NULL && caller->pw_name != NULL) {
|
||||
@@ -304,6 +324,11 @@ correct_password (const struct passwd *p
|
||||
retval = pam_set_item(pamh, PAM_TTY, tty_name);
|
||||
PAM_BAIL_P;
|
||||
}
|
||||
+#ifdef RUNUSER
|
||||
+ if (getuid() != geteuid())
|
||||
+ /* safety net: deny operation if we are suid by accident */
|
||||
+ error(EXIT_FAILURE, 1, "runuser may not be setuid");
|
||||
+#else
|
||||
retval = pam_authenticate(pamh, 0);
|
||||
PAM_BAIL_P;
|
||||
retval = pam_acct_mgmt(pamh, 0);
|
||||
@@ -313,6 +338,7 @@ correct_password (const struct passwd *p
|
||||
PAM_BAIL_P;
|
||||
}
|
||||
PAM_BAIL_P;
|
||||
+#endif
|
||||
/* must be authenticated if this point was reached */
|
||||
return 1;
|
||||
#else /* !USE_PAM */
|
||||
@@ -394,11 +420,22 @@ modify_environment (const struct passwd
|
||||
/* Become the user and group(s) specified by PW. */
|
||||
|
||||
static void
|
||||
-change_identity (const struct passwd *pw)
|
||||
+change_identity (const struct passwd *pw
|
||||
+#ifdef RUNUSER
|
||||
+ , gid_t *groups, int num_groups
|
||||
+#endif
|
||||
+ )
|
||||
{
|
||||
#ifdef HAVE_INITGROUPS
|
||||
+ int rc = 0;
|
||||
errno = 0;
|
||||
- if (initgroups (pw->pw_name, pw->pw_gid) == -1) {
|
||||
+#ifdef RUNUSER
|
||||
+ if (num_groups)
|
||||
+ rc = setgroups(num_groups, groups);
|
||||
+ else
|
||||
+#endif
|
||||
+ rc = initgroups(pw->pw_name, pw->pw_gid);
|
||||
+ if (rc == -1) {
|
||||
#ifdef USE_PAM
|
||||
pam_close_session(pamh, 0);
|
||||
pam_end(pamh, PAM_ABORT);
|
||||
@@ -445,7 +482,11 @@ pam_copyenv (pam_handle_t *pamh)
|
||||
|
||||
static void
|
||||
run_shell (char const *shell, char const *command, char **additional_args,
|
||||
- size_t n_additional_args, const struct passwd *pw)
|
||||
+ size_t n_additional_args, const struct passwd *pw
|
||||
+#ifdef RUNUSER
|
||||
+ , gid_t *groups, int num_groups
|
||||
+#endif
|
||||
+ )
|
||||
{
|
||||
size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1;
|
||||
char const **args = xnmalloc (n_args, sizeof *args);
|
||||
@@ -476,7 +517,11 @@ run_shell (char const *shell, char const
|
||||
|
||||
child = fork();
|
||||
if (child == 0) { /* child shell */
|
||||
- change_identity (pw);
|
||||
+ change_identity (pw
|
||||
+#ifdef RUNUSER
|
||||
+ , groups, num_groups
|
||||
+#endif
|
||||
+ );
|
||||
pam_end(pamh, 0);
|
||||
if (!same_session)
|
||||
setsid ();
|
||||
@@ -620,6 +665,28 @@ usage (int status)
|
||||
else
|
||||
{
|
||||
printf (_("Usage: %s [OPTION]... [-] [USER [ARG]...]\n"), program_name);
|
||||
+#ifdef RUNUSER
|
||||
+ printf (_("\
|
||||
+Change the effective user id and group id to that of USER. Only session PAM\n\
|
||||
+hooks are run, and there is no password prompt. This command is useful only\n\
|
||||
+when run as the root user. If run as a non-root user without privilege\n\
|
||||
+to set user ID, the command will fail as the binary is not setuid.\n\
|
||||
+As %s doesn't run auth and account PAM hooks, it runs with lower overhead\n\
|
||||
+than su.\n\
|
||||
+\n\
|
||||
+ -, -l, --login make the shell a login shell, uses runuser-l\n\
|
||||
+ PAM file instead of default one\n\
|
||||
+ -g --group=group specify the primary group\n\
|
||||
+ -G --supp-group=group specify a supplemental group\n\
|
||||
+ -c, --command=COMMAND pass a single COMMAND to the shell with -c\n\
|
||||
+ --session-command=COMMAND pass a single COMMAND to the shell with -c\n\
|
||||
+ and do not create a new session\n\
|
||||
+ -f, --fast pass -f to the shell (for csh or tcsh)\n\
|
||||
+ -m, --preserve-environment do not reset environment variables\n\
|
||||
+ -p same as -m\n\
|
||||
+ -s, --shell=SHELL run SHELL if /etc/shells allows it\n\
|
||||
+"), program_name);
|
||||
+#else
|
||||
fputs (_("\
|
||||
Change the effective user id and group id to that of USER.\n\
|
||||
\n\
|
||||
@@ -632,6 +697,7 @@ Change the effective user id and group i
|
||||
-p same as -m\n\
|
||||
-s, --shell=SHELL run SHELL if /etc/shells allows it\n\
|
||||
"), stdout);
|
||||
+#endif
|
||||
fputs (HELP_OPTION_DESCRIPTION, stdout);
|
||||
fputs (VERSION_OPTION_DESCRIPTION, stdout);
|
||||
fputs (_("\
|
||||
@@ -653,6 +719,12 @@ main (int argc, char **argv)
|
||||
char *shell = NULL;
|
||||
struct passwd *pw;
|
||||
struct passwd pw_copy;
|
||||
+#ifdef RUNUSER
|
||||
+ struct group *gr;
|
||||
+ gid_t groups[NGROUPS_MAX];
|
||||
+ int num_supp_groups = 0;
|
||||
+ int use_gid = 0;
|
||||
+#endif
|
||||
|
||||
initialize_main (&argc, &argv);
|
||||
set_program_name (argv[0]);
|
||||
@@ -667,7 +739,11 @@ main (int argc, char **argv)
|
||||
simulate_login = false;
|
||||
change_environment = true;
|
||||
|
||||
- while ((optc = getopt_long (argc, argv, "c:flmps:", longopts, NULL)) != -1)
|
||||
+ while ((optc = getopt_long (argc, argv, "c:flmps:"
|
||||
+#ifdef RUNUSER
|
||||
+ "g:G:"
|
||||
+#endif
|
||||
+ , longopts, NULL)) != -1)
|
||||
{
|
||||
switch (optc)
|
||||
{
|
||||
@@ -697,6 +773,28 @@ main (int argc, char **argv)
|
||||
shell = optarg;
|
||||
break;
|
||||
|
||||
+#ifdef RUNUSER
|
||||
+ case 'g':
|
||||
+ gr = getgrnam(optarg);
|
||||
+ if (!gr)
|
||||
+ error (EXIT_FAILURE, 0, _("group %s does not exist"), optarg);
|
||||
+ use_gid = 1;
|
||||
+ groups[0] = gr->gr_gid;
|
||||
+ break;
|
||||
+
|
||||
+ case 'G':
|
||||
+ num_supp_groups++;
|
||||
+ if (num_supp_groups >= NGROUPS_MAX)
|
||||
+ error (EXIT_FAILURE, 0,
|
||||
+ _("Can't specify more than %d supplemental groups"),
|
||||
+ NGROUPS_MAX - 1);
|
||||
+ gr = getgrnam(optarg);
|
||||
+ if (!gr)
|
||||
+ error (EXIT_FAILURE, 0, _("group %s does not exist"), optarg);
|
||||
+ groups[num_supp_groups] = gr->gr_gid;
|
||||
+ break;
|
||||
+#endif
|
||||
+
|
||||
case_GETOPT_HELP_CHAR;
|
||||
|
||||
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
|
||||
@@ -735,7 +833,20 @@ main (int argc, char **argv)
|
||||
: DEFAULT_SHELL);
|
||||
endpwent ();
|
||||
|
||||
- if (!correct_password (pw))
|
||||
+#ifdef RUNUSER
|
||||
+ if (num_supp_groups && !use_gid)
|
||||
+ {
|
||||
+ pw->pw_gid = groups[1];
|
||||
+ memmove (groups, groups + 1, sizeof(gid_t) * num_supp_groups);
|
||||
+ }
|
||||
+ else if (use_gid)
|
||||
+ {
|
||||
+ pw->pw_gid = groups[0];
|
||||
+ num_supp_groups++;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ if (CHECKPASSWD && !correct_password (pw))
|
||||
{
|
||||
#ifdef SYSLOG_FAILURE
|
||||
log_su (pw, false);
|
||||
@@ -767,8 +878,16 @@ main (int argc, char **argv)
|
||||
modify_environment (pw, shell);
|
||||
|
||||
#ifndef USE_PAM
|
||||
- change_identity (pw);
|
||||
+ change_identity (pw
|
||||
+#ifdef RUNUSER
|
||||
+ , groups, num_supp_groups
|
||||
+#endif
|
||||
+ );
|
||||
#endif
|
||||
|
||||
- run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw);
|
||||
+ run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw
|
||||
+#ifdef RUNUSER
|
||||
+ , groups, num_supp_groups
|
||||
+#endif
|
||||
+ );
|
||||
}
|
||||
diff -urNp coreutils-7.5.orig/tests/misc/help-version coreutils-7.5/tests/misc/help-version
|
||||
--- coreutils-7.5.orig/tests/misc/help-version
|
||||
+++ coreutils-7.5/tests/misc/help-version
|
||||
@@ -150,6 +150,7 @@ printf_args=foo
|
||||
sleep_args=0
|
||||
su_args=--version
|
||||
stdbuf_args="-oL true"
|
||||
+runuser_args=--version
|
||||
timeout_args=--version
|
||||
|
||||
# I'd rather not run sync, since it spins up disks that I've
|
||||
diff -urNp coreutils-7.6-orig/man/help2man coreutils-7.6/man/help2man
|
||||
--- coreutils-7.6-orig/man/help2man 2009-09-01 13:01:16.000000000 +0200
|
||||
+++ coreutils-7.6/man/help2man 2009-09-22 15:15:01.000000000 +0200
|
||||
@@ -550,6 +550,9 @@ while (length)
|
||||
$include{$sect} .= $content;
|
||||
}
|
||||
|
||||
+# There is no info documentation for runuser (shared with su).
|
||||
+$opt_no_info = 1 if $program eq 'runuser';
|
||||
+
|
||||
# Refer to the real documentation.
|
||||
unless ($opt_no_info)
|
||||
{
|
||||
68
coreutils-6.10-configuration.patch
Normal file
68
coreutils-6.10-configuration.patch
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
diff -urNp coreutils-7.2-orig/gnulib-tests/gnulib.mk coreutils-7.2/gnulib-tests/gnulib.mk
|
||||
--- coreutils-7.2-orig/gnulib-tests/gnulib.mk 2009-03-31 14:28:30.000000000 +0200
|
||||
+++ coreutils-7.2/gnulib-tests/gnulib.mk 2009-04-01 12:37:00.000000000 +0200
|
||||
@@ -606,9 +606,9 @@ EXTRA_DIST += test-mbsstr1.c test-mbsstr
|
||||
|
||||
## begin gnulib module memchr-tests
|
||||
|
||||
-TESTS += test-memchr
|
||||
-check_PROGRAMS += test-memchr
|
||||
-EXTRA_DIST += test-memchr.c zerosize-ptr.h
|
||||
+#TESTS += test-memchr
|
||||
+#check_PROGRAMS += test-memchr
|
||||
+#EXTRA_DIST += test-memchr.c zerosize-ptr.h
|
||||
|
||||
## end gnulib module memchr-tests
|
||||
|
||||
@@ -910,9 +910,9 @@ EXTRA_DIST += test-strtod.c
|
||||
|
||||
## begin gnulib module strverscmp-tests
|
||||
|
||||
-TESTS += test-strverscmp
|
||||
-check_PROGRAMS += test-strverscmp
|
||||
-EXTRA_DIST += test-strverscmp.c
|
||||
+#TESTS += test-strverscmp
|
||||
+#check_PROGRAMS += test-strverscmp
|
||||
+#EXTRA_DIST += test-strverscmp.c
|
||||
|
||||
## end gnulib module strverscmp-tests
|
||||
|
||||
diff -urNp coreutils-6.11-orig/tests/test-lib.sh coreutils-6.11/tests/test-lib.sh
|
||||
--- coreutils-6.11-orig/tests/test-lib.sh 2008-04-19 23:34:23.000000000 +0200
|
||||
+++ coreutils-6.11/tests/test-lib.sh 2008-04-24 14:18:59.000000000 +0200
|
||||
@@ -97,8 +97,8 @@ skip_if_()
|
||||
|
||||
require_selinux_()
|
||||
{
|
||||
- case `ls -Zd .` in
|
||||
- '? .'|'unlabeled .')
|
||||
+ case `ls --scontext -d . | cut -f1 -d" "` in
|
||||
+ '?'|'unlabeled')
|
||||
skip_test_ "this system (or maybe just" \
|
||||
"the current file system) lacks SELinux support"
|
||||
;;
|
||||
diff -urNp coreutils-7.1-orig/src/ls.c coreutils-7.1/src/ls.c
|
||||
--- coreutils-7.1-orig/src/ls.c 2009-02-25 13:23:59.000000000 +0100
|
||||
+++ coreutils-7.1/src/ls.c 2009-02-25 13:25:20.000000000 +0100
|
||||
@@ -38,10 +38,6 @@
|
||||
#include <config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
-#ifdef HAVE_CAP
|
||||
-# include <sys/capability.h>
|
||||
-#endif
|
||||
-
|
||||
#if HAVE_TERMIOS_H
|
||||
# include <termios.h>
|
||||
#endif
|
||||
@@ -84,6 +80,10 @@
|
||||
#include "system.h"
|
||||
#include <fnmatch.h>
|
||||
|
||||
+#ifdef HAVE_CAP
|
||||
+# include <sys/capability.h>
|
||||
+#endif
|
||||
+
|
||||
#include "acl.h"
|
||||
#include "argmatch.h"
|
||||
#include "dev-ino.h"
|
||||
13
coreutils-6.10-manpages.patch
Normal file
13
coreutils-6.10-manpages.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff -urNp coreutils-6.12-orig/src/md5sum.c coreutils-6.12/src/md5sum.c
|
||||
--- coreutils-6.12-orig/src/md5sum.c 2008-05-26 08:40:33.000000000 +0200
|
||||
+++ coreutils-6.12/src/md5sum.c 2008-10-21 16:07:28.000000000 +0200
|
||||
@@ -175,6 +175,9 @@ With no FILE, or when FILE is -, read st
|
||||
fputs (_("\
|
||||
-t, --text read in text mode (default)\n\
|
||||
"), stdout);
|
||||
+ fputs (_("\
|
||||
+ Note: There is no difference between binary and text mode option on GNU system.\n\
|
||||
+"), stdout);
|
||||
fputs (_("\
|
||||
\n\
|
||||
The following three options are useful only when verifying checksums:\n\
|
||||
46
coreutils-6.11-matchpathconinstall.patch
Normal file
46
coreutils-6.11-matchpathconinstall.patch
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
From a089634c855312a28f2ff3c2e7c08df5d030e2f5 Mon Sep 17 00:00:00 2001
|
||||
From: Jim Meyering <meyering <at> redhat.com>
|
||||
Date: Tue, 20 May 2008 17:58:42 +0200
|
||||
Subject: [PATCH] install: avoid a leak in currently-ifdef'd-out code
|
||||
|
||||
* src/install.c (setdefaultfilecon)
|
||||
[ENABLE_WHEN_MATCHPATHCON_IS_MORE_EFFICIENT]:
|
||||
Call matchpathcon_init_prefix only once.
|
||||
Suggestion from Stephen Smalley. Reported by Ben Webb in
|
||||
<http://bugzilla.redhat.com/447410>.
|
||||
---
|
||||
src/install.c | 5 ++++-
|
||||
1 files changed, 4 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/install.c b/src/install.c
|
||||
index 964ab36..b531f45 100644
|
||||
--- a/src/install.c
|
||||
+++ b/src/install.c
|
||||
@@ -208,6 +208,8 @@ setdefaultfilecon (char const *file)
|
||||
{
|
||||
struct stat st;
|
||||
security_context_t scontext = NULL;
|
||||
+ static bool first_call = true;
|
||||
+
|
||||
if (selinux_enabled != 1)
|
||||
{
|
||||
/* Indicate no context found. */
|
||||
@@ -216,7 +218,7 @@ setdefaultfilecon (char const *file)
|
||||
if (lstat (file, &st) != 0)
|
||||
return;
|
||||
|
||||
- if (IS_ABSOLUTE_FILE_NAME (file))
|
||||
+ if (first_call && IS_ABSOLUTE_FILE_NAME (file))
|
||||
{
|
||||
/* Calling matchpathcon_init_prefix (NULL, "/first_component/")
|
||||
is an optimization to minimize the expense of the following
|
||||
@@ -247,6 +249,7 @@ setdefaultfilecon (char const *file)
|
||||
}
|
||||
}
|
||||
}
|
||||
+ first_call = false;
|
||||
|
||||
/* If there's an error determining the context, or it has none,
|
||||
return to allow default context */
|
||||
--
|
||||
1.5.5.1.249.g68ef3
|
||||
7
coreutils-6.7.tar.bz2.sig
Normal file
7
coreutils-6.7.tar.bz2.sig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1.4.6 (GNU/Linux)
|
||||
|
||||
iD8DBQBFeKRc/dLerNMzy6ERAiEJAJ435eWCOpfJkoCKoSpnh8Fwwb9XugCgnQ5H
|
||||
SYg6l7M/jyvUdsFM1yS4RKk=
|
||||
=GOOc
|
||||
-----END PGP SIGNATURE-----
|
||||
7
coreutils-6.9.tar.bz2.sig
Normal file
7
coreutils-6.9.tar.bz2.sig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1.4.6 (GNU/Linux)
|
||||
|
||||
iD8DBQBGAvc3/dLerNMzy6ERAnyfAKC4MPj62hCSRYNu0ysD9SahdQvZIACgsNl/
|
||||
CzQjwTNo5FUiiNm0FxtL5Ow=
|
||||
=gl3O
|
||||
-----END PGP SIGNATURE-----
|
||||
12
coreutils-7.4-sttytcsadrain.patch
Normal file
12
coreutils-7.4-sttytcsadrain.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -urNp coreutils-7.4-orig/src/stty.c coreutils-7.4/src/stty.c
|
||||
--- coreutils-7.4-orig/src/stty.c 2009-04-24 14:41:19.000000000 +0200
|
||||
+++ coreutils-7.4/src/stty.c 2009-06-11 10:15:41.000000000 +0200
|
||||
@@ -1001,7 +1001,7 @@ main (int argc, char **argv)
|
||||
spurious difference in an uninitialized portion of the structure. */
|
||||
DECLARE_ZEROED_AGGREGATE (struct termios, new_mode);
|
||||
|
||||
- if (tcsetattr (STDIN_FILENO, TCSADRAIN, &mode))
|
||||
+ if (tcsetattr (STDIN_FILENO, TCSANOW, &mode))
|
||||
error (EXIT_FAILURE, errno, "%s", device_name);
|
||||
|
||||
/* POSIX (according to Zlotnick's book) tcsetattr returns zero if
|
||||
24
coreutils-7.6-ftssubmount.patch
Normal file
24
coreutils-7.6-ftssubmount.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff -urNp coreutils-7.6-orig/lib/fts.c coreutils-7.6/lib/fts.c
|
||||
--- coreutils-7.6-orig/lib/fts.c 2009-09-10 19:33:40.000000000 +0200
|
||||
+++ coreutils-7.6/lib/fts.c 2009-11-18 14:34:17.000000000 +0100
|
||||
@@ -1276,6 +1276,20 @@ fts_build (register FTS *sp, int type)
|
||||
opening it. */
|
||||
if (cur->fts_info == FTS_NSOK)
|
||||
cur->fts_info = fts_stat(sp, cur, false);
|
||||
+ else if (sp->fts_options & FTS_TIGHT_CYCLE_CHECK) {
|
||||
+ /* Now read the stat info again after opening a directory to
|
||||
+ * reveal eventual changes caused by a submount triggered by
|
||||
+ * the traversal. But do it only for utilities which use
|
||||
+ * FTS_TIGHT_CYCLE_CHECK. Therefore, only find and du
|
||||
+ * benefit/suffer from this feature for now.
|
||||
+ */
|
||||
+ LEAVE_DIR (sp, cur, "4");
|
||||
+ fts_stat (sp, cur, false);
|
||||
+ if (! enter_dir (sp, cur)) {
|
||||
+ __set_errno (ENOMEM);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
/*
|
||||
* Nlinks is the number of possible entries of type directory in the
|
||||
65
coreutils-7.6-ls-derefdanglinginode.patch
Normal file
65
coreutils-7.6-ls-derefdanglinginode.patch
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
diff -urNp coreutils-7.6-orig/src/ls.c coreutils-7.6/src/ls.c
|
||||
--- coreutils-7.6-orig/src/ls.c 2009-11-23 10:31:08.000000000 +0100
|
||||
+++ coreutils-7.6/src/ls.c 2009-11-23 10:35:47.000000000 +0100
|
||||
@@ -3592,6 +3592,18 @@ format_group_width (gid_t g)
|
||||
}
|
||||
|
||||
|
||||
+/* Return a pointer to a formatted version of F->stat.st_ino,
|
||||
+ possibly using buffer, BUF, of length BUFLEN, which must be at least
|
||||
+ INT_BUFSIZE_BOUND (uintmax_t) bytes. */
|
||||
+static char *
|
||||
+format_inode (char *buf, size_t buflen, const struct fileinfo *f)
|
||||
+{
|
||||
+ assert (INT_BUFSIZE_BOUND (uintmax_t) <= buflen);
|
||||
+ return (f->stat.st_ino == NOT_AN_INODE_NUMBER
|
||||
+ ? (char *) "?"
|
||||
+ : umaxtostr (f->stat.st_ino, buf));
|
||||
+}
|
||||
+
|
||||
/* Print info about f in scontext format */
|
||||
static void
|
||||
print_scontext_format (const struct fileinfo *f)
|
||||
@@ -3713,9 +3725,7 @@ print_long_format (const struct fileinfo
|
||||
{
|
||||
char hbuf[INT_BUFSIZE_BOUND (uintmax_t)];
|
||||
sprintf (p, "%*s ", inode_number_width,
|
||||
- (f->stat.st_ino == NOT_AN_INODE_NUMBER
|
||||
- ? "?"
|
||||
- : umaxtostr (f->stat.st_ino, hbuf)));
|
||||
+ format_inode (hbuf, sizeof hbuf, f));
|
||||
/* Increment by strlen (p) here, rather than by inode_number_width + 1.
|
||||
The latter is wrong when inode_number_width is zero. */
|
||||
p += strlen (p);
|
||||
@@ -4105,7 +4115,7 @@ print_file_name_and_frills (const struct
|
||||
|
||||
if (print_inode)
|
||||
printf ("%*s ", format == with_commas ? 0 : inode_number_width,
|
||||
- umaxtostr (f->stat.st_ino, buf));
|
||||
+ format_inode (buf, sizeof buf, f));
|
||||
|
||||
if (print_block_size)
|
||||
printf ("%*s ", format == with_commas ? 0 : block_size_width,
|
||||
diff -urNp coreutils-7.6-orig/tests/ls/dangle coreutils-7.6/tests/ls/dangle
|
||||
--- coreutils-7.6-orig/tests/ls/dangle 2009-09-01 13:01:16.000000000 +0200
|
||||
+++ coreutils-7.6/tests/ls/dangle 2009-11-23 10:37:44.000000000 +0100
|
||||
@@ -26,6 +26,9 @@ fi
|
||||
ln -s no-such-file dangle || framework_failure
|
||||
mkdir -p dir/sub || framework_failure
|
||||
ln -s dir slink-to-dir || framework_failure
|
||||
+mkdir d || framework_failure
|
||||
+ln -s no-such d/dangle || framework_failure
|
||||
+echo '? dangle' > subdir_exp || framework_failure
|
||||
|
||||
fail=0
|
||||
|
||||
@@ -50,4 +53,9 @@ EOF
|
||||
|
||||
compare out exp || fail=1
|
||||
|
||||
+# Ensure that ls -Li prints "?" as the inode of a dangling symlink.
|
||||
+rm -f out
|
||||
+ls -Li d > out 2>/dev/null && fail=1
|
||||
+compare out subdir_exp || fail=1
|
||||
+
|
||||
Exit $fail
|
||||
71
coreutils-7.6-ls-infloop.patch
Normal file
71
coreutils-7.6-ls-infloop.patch
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
diff -urNp coreutils-7.6-orig/doc/coreutils.texi coreutils-7.6/doc/coreutils.texi
|
||||
--- coreutils-7.6-orig/doc/coreutils.texi 2009-11-23 10:21:55.000000000 +0100
|
||||
+++ coreutils-7.6/doc/coreutils.texi 2009-11-23 10:24:03.000000000 +0100
|
||||
@@ -6113,8 +6113,9 @@ Exit status:
|
||||
1 minor problems (e.g., failure to access a file or directory not
|
||||
specified as a command line argument. This happens when listing a
|
||||
directory in which entries are actively being removed or renamed.)
|
||||
-2 serious trouble (e.g., memory exhausted, invalid option or failure
|
||||
- to access file or directory specified as a command line argument)
|
||||
+2 serious trouble (e.g., memory exhausted, invalid option, failure
|
||||
+ to access a file or directory specified as a command line argument
|
||||
+ or a directory loop)
|
||||
@end display
|
||||
|
||||
Also see @ref{Common options}.
|
||||
diff -urNp coreutils-7.6-orig/src/ls.c coreutils-7.6/src/ls.c
|
||||
--- coreutils-7.6-orig/src/ls.c 2009-11-23 10:21:55.000000000 +0100
|
||||
+++ coreutils-7.6/src/ls.c 2009-11-23 10:24:40.000000000 +0100
|
||||
@@ -2494,6 +2494,7 @@ print_dir (char const *name, char const
|
||||
error (0, 0, _("%s: not listing already-listed directory"),
|
||||
quotearg_colon (name));
|
||||
closedir (dirp);
|
||||
+ set_exit_status (true);
|
||||
return;
|
||||
}
|
||||
|
||||
diff -urNp coreutils-7.6-orig/tests/ls/infloop coreutils-7.6/tests/ls/infloop
|
||||
--- coreutils-7.6-orig/tests/ls/infloop 2009-09-01 13:01:16.000000000 +0200
|
||||
+++ coreutils-7.6/tests/ls/infloop 2009-11-23 10:28:45.000000000 +0100
|
||||
@@ -2,6 +2,7 @@
|
||||
# show that the following no longer makes ls infloop
|
||||
# mkdir loop; cd loop; ln -s ../loop sub; ls -RL
|
||||
|
||||
+# Also ensure ls exits with status = 2 in that case.
|
||||
# Copyright (C) 2001-2002, 2004, 2006-2009 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -27,21 +28,22 @@ fi
|
||||
mkdir loop || framework_failure
|
||||
ln -s ../loop loop/sub || framework_failure
|
||||
|
||||
-fail=0
|
||||
-
|
||||
-ls -RL loop 2>err | head -n 7 > out
|
||||
-# With an inf-looping ls, out will contain these 7 lines:
|
||||
-cat <<EOF > bad
|
||||
+cat <<\EOF > exp-out || framework_failure
|
||||
loop:
|
||||
sub
|
||||
+EOF
|
||||
|
||||
-loop/sub:
|
||||
-sub
|
||||
-
|
||||
-loop/sub/sub:
|
||||
+cat <<\EOF > exp-err || framework_failure
|
||||
+ls: loop/sub: not listing already-listed directory
|
||||
EOF
|
||||
|
||||
-# Make sure we don't get the "bad" output.
|
||||
-compare out bad > /dev/null 2>&1 && fail=1
|
||||
+fail=0
|
||||
+
|
||||
+timeout 1 ls -RL loop 2>err > out
|
||||
+# Ensure that ls exits with status 2 upon detecting a cycle
|
||||
+test $? = 2 || fail=1
|
||||
+
|
||||
+compare err exp-err || fail=1
|
||||
+compare out exp-out || fail=1
|
||||
|
||||
Exit $fail
|
||||
11
coreutils-7.6-lzipcolor.patch
Normal file
11
coreutils-7.6-lzipcolor.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
diff -urNp coreutils-7.6-orig/src/dircolors.hin coreutils-7.6/src/dircolors.hin
|
||||
--- coreutils-7.6-orig/src/dircolors.hin 2009-09-01 13:01:16.000000000 +0200
|
||||
+++ coreutils-7.6/src/dircolors.hin 2009-09-21 08:00:38.000000000 +0200
|
||||
@@ -131,6 +131,7 @@ EXEC 01;32
|
||||
.cpio 01;31
|
||||
.7z 01;31
|
||||
.rz 01;31
|
||||
+.lz 01;31
|
||||
|
||||
# image formats
|
||||
.jpg 01;35
|
||||
18
coreutils-7.6-tail-F-renaming.patch
Normal file
18
coreutils-7.6-tail-F-renaming.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
diff -urNp coreutils-7.6-orig/src/tail.c coreutils-7.6/src/tail.c
|
||||
--- coreutils-7.6-orig/src/tail.c 2009-09-10 19:33:26.000000000 +0200
|
||||
+++ coreutils-7.6/src/tail.c 2009-11-18 14:43:19.000000000 +0100
|
||||
@@ -1357,7 +1357,13 @@ tail_forever_inotify (int wd, struct Fil
|
||||
|
||||
if (ev->mask & (IN_ATTRIB | IN_DELETE_SELF | IN_MOVE_SELF))
|
||||
{
|
||||
- if (ev->mask & (IN_DELETE_SELF | IN_MOVE_SELF))
|
||||
+ /* For IN_DELETE_SELF, we always want to remove the watch.
|
||||
+ However, for IN_MOVE_SELF (the file we're watching has
|
||||
+ been clobbered via a rename), when tailing by NAME, we
|
||||
+ must continue to watch the file. It's only when following
|
||||
+ by file descriptor that we must remove the watch. */
|
||||
+ if ((ev->mask & IN_DELETE_SELF)
|
||||
+ || ((ev->mask & IN_MOVE_SELF) && follow_mode == Follow_descriptor))
|
||||
{
|
||||
inotify_rm_watch (wd, f[i].wd);
|
||||
hash_delete (wd_table, &(f[i]));
|
||||
670
coreutils-7.6-tail-rebase.patch
Normal file
670
coreutils-7.6-tail-rebase.patch
Normal file
|
|
@ -0,0 +1,670 @@
|
|||
diff -urNp coreutils-7.6-orig/src/tail.c coreutils-7.6/src/tail.c
|
||||
--- coreutils-7.6-orig/src/tail.c 2010-01-12 15:26:31.000000000 +0100
|
||||
+++ coreutils-7.6/src/tail.c 2010-01-12 15:27:18.000000000 +0100
|
||||
@@ -1,6 +1,5 @@
|
||||
/* tail -- output the last part of file(s)
|
||||
- Copyright (C) 1989, 90, 91, 1995-2006, 2008-2009 Free Software
|
||||
- Foundation, Inc.
|
||||
+ Copyright (C) 1989-1991, 1995-2006, 2008-2010 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -52,6 +51,12 @@
|
||||
# include <sys/inotify.h>
|
||||
/* `select' is used by tail_forever_inotify. */
|
||||
# include <sys/select.h>
|
||||
+
|
||||
+/* inotify needs to know if a file is local. */
|
||||
+# include "fs.h"
|
||||
+# if HAVE_SYS_STATFS_H
|
||||
+# include <sys/statfs.h>
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
/* The official name of this program (e.g., no `g' prefix). */
|
||||
@@ -105,9 +110,6 @@ struct File_spec
|
||||
/* The actual file name, or "-" for stdin. */
|
||||
char *name;
|
||||
|
||||
- /* File descriptor on which the file is open; -1 if it's not open. */
|
||||
- int fd;
|
||||
-
|
||||
/* Attributes of the file the last time we checked. */
|
||||
off_t size;
|
||||
struct timespec mtime;
|
||||
@@ -115,24 +117,27 @@ struct File_spec
|
||||
ino_t ino;
|
||||
mode_t mode;
|
||||
|
||||
- /* 1 if O_NONBLOCK is clear, 0 if set, -1 if not known. */
|
||||
- int blocking;
|
||||
-
|
||||
/* The specified name initially referred to a directory or some other
|
||||
type for which tail isn't meaningful. Unlike for a permission problem
|
||||
(tailable, below) once this is set, the name is not checked ever again. */
|
||||
bool ignore;
|
||||
|
||||
- /* See description of DEFAULT_MAX_N_... below. */
|
||||
- uintmax_t n_unchanged_stats;
|
||||
+ /* See the description of fremote. */
|
||||
+ bool remote;
|
||||
|
||||
/* A file is tailable if it exists, is readable, and is of type
|
||||
IS_TAILABLE_FILE_TYPE. */
|
||||
bool tailable;
|
||||
|
||||
+ /* File descriptor on which the file is open; -1 if it's not open. */
|
||||
+ int fd;
|
||||
+
|
||||
/* The value of errno seen last time we checked this file. */
|
||||
int errnum;
|
||||
|
||||
+ /* 1 if O_NONBLOCK is clear, 0 if set, -1 if not known. */
|
||||
+ int blocking;
|
||||
+
|
||||
#if HAVE_INOTIFY
|
||||
/* The watch descriptor used by inotify. */
|
||||
int wd;
|
||||
@@ -144,6 +149,9 @@ struct File_spec
|
||||
/* Offset in NAME of the basename part. */
|
||||
size_t basename_start;
|
||||
#endif
|
||||
+
|
||||
+ /* See description of DEFAULT_MAX_N_... below. */
|
||||
+ uintmax_t n_unchanged_stats;
|
||||
};
|
||||
|
||||
#if HAVE_INOTIFY
|
||||
@@ -201,8 +209,7 @@ static bool have_read_stdin;
|
||||
more expensive) code unconditionally. Intended solely for testing. */
|
||||
static bool presume_input_pipe;
|
||||
|
||||
-/* If nonzero then don't use inotify even if available.
|
||||
- Intended solely for testing. */
|
||||
+/* If nonzero then don't use inotify even if available. */
|
||||
static bool disable_inotify;
|
||||
|
||||
/* For long options that have no equivalent short option, use a
|
||||
@@ -260,8 +267,8 @@ With no FILE, or when FILE is -, read st
|
||||
Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
- -c, --bytes=K output the last K bytes; alternatively, use +K to\n\
|
||||
- output bytes starting with the Kth of each file\n\
|
||||
+ -c, --bytes=K output the last K bytes; alternatively, use -c +K\n\
|
||||
+ to output bytes starting with the Kth of each file\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
-f, --follow[={name|descriptor}]\n\
|
||||
@@ -272,7 +279,7 @@ Mandatory arguments to long options are
|
||||
"), stdout);
|
||||
printf (_("\
|
||||
-n, --lines=K output the last K lines, instead of the last %d;\n\
|
||||
- or use +K to output lines starting with the Kth\n\
|
||||
+ or use -n +K to output lines starting with the Kth\n\
|
||||
--max-unchanged-stats=N\n\
|
||||
with --follow=name, reopen a FILE which has not\n\
|
||||
changed size after N (default %d) iterations\n\
|
||||
@@ -308,14 +315,10 @@ GB 1000*1000*1000, G 1024*1024*1024, and
|
||||
fputs (_("\
|
||||
With --follow (-f), tail defaults to following the file descriptor, which\n\
|
||||
means that even if a tail'ed file is renamed, tail will continue to track\n\
|
||||
-its end. \
|
||||
-"), stdout);
|
||||
- fputs (_("\
|
||||
-This default behavior is not desirable when you really want to\n\
|
||||
+its end. This default behavior is not desirable when you really want to\n\
|
||||
track the actual name of the file, not the file descriptor (e.g., log\n\
|
||||
rotation). Use --follow=name in that case. That causes tail to track the\n\
|
||||
-named file by reopening it periodically to see if it has been removed and\n\
|
||||
-recreated by some other program.\n\
|
||||
+named file in a way that accommodates renaming, removal and creation.\n\
|
||||
"), stdout);
|
||||
emit_bug_reporting_address ();
|
||||
}
|
||||
@@ -865,6 +868,50 @@ start_lines (const char *pretty_filename
|
||||
}
|
||||
}
|
||||
|
||||
+#if HAVE_INOTIFY
|
||||
+/* Without inotify support, always return false. Otherwise, return false
|
||||
+ when FD is open on a file known to reside on a local file system.
|
||||
+ If fstatfs fails, give a diagnostic and return true.
|
||||
+ If fstatfs cannot be called, return true. */
|
||||
+static bool
|
||||
+fremote (int fd, const char *name)
|
||||
+{
|
||||
+ bool remote = true; /* be conservative (poll by default). */
|
||||
+
|
||||
+# if HAVE_FSTATFS && HAVE_STRUCT_STATFS_F_TYPE && defined __linux__
|
||||
+ struct statfs buf;
|
||||
+ int err = fstatfs (fd, &buf);
|
||||
+ if (err != 0)
|
||||
+ {
|
||||
+ error (0, errno, _("cannot determine location of %s. "
|
||||
+ "reverting to polling"), quote (name));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ switch (buf.f_type)
|
||||
+ {
|
||||
+ case S_MAGIC_CODA:
|
||||
+ case S_MAGIC_FUSECTL:
|
||||
+ case S_MAGIC_LUSTRE:
|
||||
+ case S_MAGIC_NCP:
|
||||
+ case S_MAGIC_NFS:
|
||||
+ case S_MAGIC_NFSD:
|
||||
+ case S_MAGIC_SMB:
|
||||
+ break;
|
||||
+ default:
|
||||
+ remote = false;
|
||||
+ }
|
||||
+ }
|
||||
+# endif
|
||||
+
|
||||
+ return remote;
|
||||
+}
|
||||
+#else
|
||||
+/* Without inotify support, whether a file is remote is irrelevant.
|
||||
+ Always return "false" in that case. */
|
||||
+# define fremote(fd, name) false
|
||||
+#endif
|
||||
+
|
||||
/* FIXME: describe */
|
||||
|
||||
static void
|
||||
@@ -921,6 +968,15 @@ recheck (struct File_spec *f, bool block
|
||||
quote (pretty_name (f)));
|
||||
f->ignore = true;
|
||||
}
|
||||
+ else if (!disable_inotify && fremote (fd, pretty_name (f)))
|
||||
+ {
|
||||
+ ok = false;
|
||||
+ f->errnum = -1;
|
||||
+ error (0, 0, _("%s has been replaced with a remote file. "
|
||||
+ "giving up on this name"), quote (pretty_name (f)));
|
||||
+ f->ignore = true;
|
||||
+ f->remote = true;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
f->errnum = 0;
|
||||
@@ -1126,7 +1182,7 @@ tail_forever (struct File_spec *f, size_
|
||||
break;
|
||||
}
|
||||
|
||||
- if ((!any_input | blocking) && fflush (stdout) != 0)
|
||||
+ if ((!any_input || blocking) && fflush (stdout) != 0)
|
||||
error (EXIT_FAILURE, errno, _("write error"));
|
||||
|
||||
/* If nothing was read, sleep and/or check for dead writers. */
|
||||
@@ -1135,9 +1191,6 @@ tail_forever (struct File_spec *f, size_
|
||||
if (writer_is_dead)
|
||||
break;
|
||||
|
||||
- if (xnanosleep (sleep_interval))
|
||||
- error (EXIT_FAILURE, errno, _("cannot read realtime clock"));
|
||||
-
|
||||
/* Once the writer is dead, read the files once more to
|
||||
avoid a race condition. */
|
||||
writer_is_dead = (pid != 0
|
||||
@@ -1146,12 +1199,44 @@ tail_forever (struct File_spec *f, size_
|
||||
signal to the writer, so kill fails and sets
|
||||
errno to EPERM. */
|
||||
&& errno != EPERM);
|
||||
+
|
||||
+ if (!writer_is_dead && xnanosleep (sleep_interval))
|
||||
+ error (EXIT_FAILURE, errno, _("cannot read realtime clock"));
|
||||
+
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if HAVE_INOTIFY
|
||||
|
||||
+/* Return true if any of the N_FILES files in F is remote, i.e., has
|
||||
+ an open file descriptor and is on a network file system. */
|
||||
+
|
||||
+static bool
|
||||
+any_remote_file (const struct File_spec *f, size_t n_files)
|
||||
+{
|
||||
+ size_t i;
|
||||
+
|
||||
+ for (i = 0; i < n_files; i++)
|
||||
+ if (0 <= f[i].fd && f[i].remote)
|
||||
+ return true;
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+/* Return true if any of the N_FILES files in F represents
|
||||
+ stdin and is tailable. */
|
||||
+
|
||||
+static bool
|
||||
+tailable_stdin (const struct File_spec *f, size_t n_files)
|
||||
+{
|
||||
+ size_t i;
|
||||
+
|
||||
+ for (i = 0; i < n_files; i++)
|
||||
+ if (!f[i].ignore && STREQ (f[i].name, "-"))
|
||||
+ return true;
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
static size_t
|
||||
wd_hasher (const void *entry, size_t tabsize)
|
||||
{
|
||||
@@ -1167,31 +1252,73 @@ wd_comparator (const void *e1, const voi
|
||||
return spec1->wd == spec2->wd;
|
||||
}
|
||||
|
||||
+/* Helper function used by `tail_forever_inotify'. */
|
||||
+static void
|
||||
+check_fspec (struct File_spec *fspec, int wd, int *prev_wd)
|
||||
+{
|
||||
+ struct stat stats;
|
||||
+ char const *name = pretty_name (fspec);
|
||||
+
|
||||
+ if (fstat (fspec->fd, &stats) != 0)
|
||||
+ {
|
||||
+ close_fd (fspec->fd, name);
|
||||
+ fspec->fd = -1;
|
||||
+ fspec->errnum = errno;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (S_ISREG (fspec->mode) && stats.st_size < fspec->size)
|
||||
+ {
|
||||
+ error (0, 0, _("%s: file truncated"), name);
|
||||
+ *prev_wd = wd;
|
||||
+ xlseek (fspec->fd, stats.st_size, SEEK_SET, name);
|
||||
+ fspec->size = stats.st_size;
|
||||
+ }
|
||||
+ else if (S_ISREG (fspec->mode) && stats.st_size == fspec->size
|
||||
+ && timespec_cmp (fspec->mtime, get_stat_mtime (&stats)) == 0)
|
||||
+ return;
|
||||
+
|
||||
+ if (wd != *prev_wd)
|
||||
+ {
|
||||
+ if (print_headers)
|
||||
+ write_header (name);
|
||||
+ *prev_wd = wd;
|
||||
+ }
|
||||
+
|
||||
+ uintmax_t bytes_read = dump_remainder (name, fspec->fd, COPY_TO_EOF);
|
||||
+ fspec->size += bytes_read;
|
||||
+
|
||||
+ if (fflush (stdout) != 0)
|
||||
+ error (EXIT_FAILURE, errno, _("write error"));
|
||||
+}
|
||||
+
|
||||
/* Tail N_FILES files forever, or until killed.
|
||||
Check modifications using the inotify events system. */
|
||||
-
|
||||
static void
|
||||
tail_forever_inotify (int wd, struct File_spec *f, size_t n_files,
|
||||
double sleep_interval)
|
||||
{
|
||||
- size_t i;
|
||||
unsigned int max_realloc = 3;
|
||||
- Hash_table *wd_table;
|
||||
+
|
||||
+ /* Map an inotify watch descriptor to the name of the file it's watching. */
|
||||
+ Hash_table *wd_to_name;
|
||||
|
||||
bool found_watchable = false;
|
||||
+ bool writer_is_dead = false;
|
||||
int prev_wd;
|
||||
size_t evlen = 0;
|
||||
char *evbuf;
|
||||
size_t evbuf_off = 0;
|
||||
size_t len = 0;
|
||||
|
||||
- wd_table = hash_initialize (n_files, NULL, wd_hasher, wd_comparator, NULL);
|
||||
- if (! wd_table)
|
||||
+ wd_to_name = hash_initialize (n_files, NULL, wd_hasher, wd_comparator, NULL);
|
||||
+ if (! wd_to_name)
|
||||
xalloc_die ();
|
||||
|
||||
/* Add an inotify watch for each watched file. If -F is specified then watch
|
||||
its parent directory too, in this way when they re-appear we can add them
|
||||
again to the watch list. */
|
||||
+ size_t i;
|
||||
for (i = 0; i < n_files; i++)
|
||||
{
|
||||
if (!f[i].ignore)
|
||||
@@ -1235,7 +1362,7 @@ tail_forever_inotify (int wd, struct Fil
|
||||
continue;
|
||||
}
|
||||
|
||||
- if (hash_insert (wd_table, &(f[i])) == NULL)
|
||||
+ if (hash_insert (wd_to_name, &(f[i])) == NULL)
|
||||
xalloc_die ();
|
||||
|
||||
found_watchable = true;
|
||||
@@ -1247,6 +1374,14 @@ tail_forever_inotify (int wd, struct Fil
|
||||
|
||||
prev_wd = f[n_files - 1].wd;
|
||||
|
||||
+ /* Check files again. New data can be available since last time we checked
|
||||
+ and before they are watched by inotify. */
|
||||
+ for (i = 0; i < n_files; i++)
|
||||
+ {
|
||||
+ if (!f[i].ignore)
|
||||
+ check_fspec (&f[i], f[i].wd, &prev_wd);
|
||||
+ }
|
||||
+
|
||||
evlen += sizeof (struct inotify_event) + 1;
|
||||
evbuf = xmalloc (evlen);
|
||||
|
||||
@@ -1255,41 +1390,37 @@ tail_forever_inotify (int wd, struct Fil
|
||||
This loop sleeps on the `safe_read' call until a new event is notified. */
|
||||
while (1)
|
||||
{
|
||||
- char const *name;
|
||||
struct File_spec *fspec;
|
||||
- uintmax_t bytes_read;
|
||||
- struct stat stats;
|
||||
-
|
||||
struct inotify_event *ev;
|
||||
|
||||
/* When watching a PID, ensure that a read from WD will not block
|
||||
- indefinetely. */
|
||||
+ indefinitely. */
|
||||
if (pid)
|
||||
{
|
||||
- fd_set rfd;
|
||||
- struct timeval select_timeout;
|
||||
- int n_descriptors;
|
||||
-
|
||||
- FD_ZERO (&rfd);
|
||||
- FD_SET (wd, &rfd);
|
||||
+ if (writer_is_dead)
|
||||
+ exit (EXIT_SUCCESS);
|
||||
|
||||
- select_timeout.tv_sec = (time_t) sleep_interval;
|
||||
- select_timeout.tv_usec = 1000000 * (sleep_interval
|
||||
- - select_timeout.tv_sec);
|
||||
+ writer_is_dead = (kill (pid, 0) != 0 && errno != EPERM);
|
||||
|
||||
- n_descriptors = select (wd + 1, &rfd, NULL, NULL, &select_timeout);
|
||||
+ struct timeval delay; /* how long to wait for file changes. */
|
||||
+ if (writer_is_dead)
|
||||
+ delay.tv_sec = delay.tv_usec = 0;
|
||||
+ else
|
||||
+ {
|
||||
+ delay.tv_sec = (time_t) sleep_interval;
|
||||
+ delay.tv_usec = 1000000 * (sleep_interval - delay.tv_sec);
|
||||
+ }
|
||||
|
||||
- if (n_descriptors == -1)
|
||||
- error (EXIT_FAILURE, errno, _("error monitoring inotify event"));
|
||||
+ fd_set rfd;
|
||||
+ FD_ZERO (&rfd);
|
||||
+ FD_SET (wd, &rfd);
|
||||
|
||||
- if (n_descriptors == 0)
|
||||
- {
|
||||
- /* See if the process we are monitoring is still alive. */
|
||||
- if (kill (pid, 0) != 0 && errno != EPERM)
|
||||
- exit (EXIT_SUCCESS);
|
||||
+ int file_change = select (wd + 1, &rfd, NULL, NULL, &delay);
|
||||
|
||||
- continue;
|
||||
- }
|
||||
+ if (file_change == 0)
|
||||
+ continue;
|
||||
+ else if (file_change == -1)
|
||||
+ error (EXIT_FAILURE, errno, _("error monitoring inotify event"));
|
||||
}
|
||||
|
||||
if (len <= evbuf_off)
|
||||
@@ -1315,41 +1446,59 @@ tail_forever_inotify (int wd, struct Fil
|
||||
ev = (struct inotify_event *) (evbuf + evbuf_off);
|
||||
evbuf_off += sizeof (*ev) + ev->len;
|
||||
|
||||
- if (ev->len)
|
||||
+ if (ev->len) /* event on ev->name in watched directory */
|
||||
{
|
||||
- for (i = 0; i < n_files; i++)
|
||||
+ size_t j;
|
||||
+ for (j = 0; j < n_files; j++)
|
||||
{
|
||||
/* With N=hundreds of frequently-changing files, this O(N^2)
|
||||
process might be a problem. FIXME: use a hash table? */
|
||||
- if (f[i].parent_wd == ev->wd
|
||||
- && STREQ (ev->name, f[i].name + f[i].basename_start))
|
||||
+ if (f[j].parent_wd == ev->wd
|
||||
+ && STREQ (ev->name, f[j].name + f[j].basename_start))
|
||||
break;
|
||||
}
|
||||
|
||||
/* It is not a watched file. */
|
||||
- if (i == n_files)
|
||||
+ if (j == n_files)
|
||||
continue;
|
||||
|
||||
- f[i].wd = inotify_add_watch (wd, f[i].name, inotify_wd_mask);
|
||||
-
|
||||
- if (f[i].wd < 0)
|
||||
+ /* It's fine to add the same file more than once. */
|
||||
+ int new_wd = inotify_add_watch (wd, f[j].name, inotify_wd_mask);
|
||||
+ if (new_wd < 0)
|
||||
{
|
||||
- error (0, errno, _("cannot watch %s"), quote (f[i].name));
|
||||
+ error (0, errno, _("cannot watch %s"), quote (f[j].name));
|
||||
continue;
|
||||
}
|
||||
|
||||
- fspec = &(f[i]);
|
||||
- if (hash_insert (wd_table, fspec) == NULL)
|
||||
+ fspec = &(f[j]);
|
||||
+
|
||||
+ /* Remove `fspec' and re-add it using `new_fd' as its key. */
|
||||
+ hash_delete (wd_to_name, fspec);
|
||||
+ fspec->wd = new_wd;
|
||||
+
|
||||
+ /* If the file was moved then inotify will use the source file wd for
|
||||
+ the destination file. Make sure the key is not present in the
|
||||
+ table. */
|
||||
+ struct File_spec *prev = hash_delete (wd_to_name, fspec);
|
||||
+ if (prev && prev != fspec)
|
||||
+ {
|
||||
+ if (follow_mode == Follow_name)
|
||||
+ recheck (prev, false);
|
||||
+ prev->wd = -1;
|
||||
+ close_fd (prev->fd, pretty_name (prev));
|
||||
+ }
|
||||
+
|
||||
+ if (hash_insert (wd_to_name, fspec) == NULL)
|
||||
xalloc_die ();
|
||||
|
||||
if (follow_mode == Follow_name)
|
||||
- recheck (&(f[i]), false);
|
||||
+ recheck (fspec, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
struct File_spec key;
|
||||
key.wd = ev->wd;
|
||||
- fspec = hash_lookup (wd_table, &key);
|
||||
+ fspec = hash_lookup (wd_to_name, &key);
|
||||
}
|
||||
|
||||
if (! fspec)
|
||||
@@ -1357,53 +1506,23 @@ tail_forever_inotify (int wd, struct Fil
|
||||
|
||||
if (ev->mask & (IN_ATTRIB | IN_DELETE_SELF | IN_MOVE_SELF))
|
||||
{
|
||||
- /* For IN_DELETE_SELF, we always want to remove the watch.
|
||||
- However, for IN_MOVE_SELF (the file we're watching has
|
||||
- been clobbered via a rename), when tailing by NAME, we
|
||||
- must continue to watch the file. It's only when following
|
||||
- by file descriptor that we must remove the watch. */
|
||||
- if ((ev->mask & IN_DELETE_SELF)
|
||||
- || ((ev->mask & IN_MOVE_SELF) && follow_mode == Follow_descriptor))
|
||||
+ /* For IN_DELETE_SELF, we always want to remove the watch.
|
||||
+ However, for IN_MOVE_SELF (the file we're watching has
|
||||
+ been clobbered via a rename), when tailing by NAME, we
|
||||
+ must continue to watch the file. It's only when following
|
||||
+ by file descriptor that we must remove the watch. */
|
||||
+ if ((ev->mask & IN_DELETE_SELF)
|
||||
+ || ((ev->mask & IN_MOVE_SELF) && follow_mode == Follow_descriptor))
|
||||
{
|
||||
- inotify_rm_watch (wd, f[i].wd);
|
||||
- hash_delete (wd_table, &(f[i]));
|
||||
+ inotify_rm_watch (wd, fspec->wd);
|
||||
+ hash_delete (wd_to_name, fspec);
|
||||
}
|
||||
if (follow_mode == Follow_name)
|
||||
recheck (fspec, false);
|
||||
|
||||
continue;
|
||||
}
|
||||
-
|
||||
- name = pretty_name (fspec);
|
||||
-
|
||||
- if (fstat (fspec->fd, &stats) != 0)
|
||||
- {
|
||||
- close_fd (fspec->fd, name);
|
||||
- fspec->fd = -1;
|
||||
- fspec->errnum = errno;
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- if (S_ISREG (fspec->mode) && stats.st_size < fspec->size)
|
||||
- {
|
||||
- error (0, 0, _("%s: file truncated"), name);
|
||||
- prev_wd = ev->wd;
|
||||
- xlseek (fspec->fd, stats.st_size, SEEK_SET, name);
|
||||
- fspec->size = stats.st_size;
|
||||
- }
|
||||
-
|
||||
- if (ev->wd != prev_wd)
|
||||
- {
|
||||
- if (print_headers)
|
||||
- write_header (name);
|
||||
- prev_wd = ev->wd;
|
||||
- }
|
||||
-
|
||||
- bytes_read = dump_remainder (name, fspec->fd, COPY_TO_EOF);
|
||||
- fspec->size += bytes_read;
|
||||
-
|
||||
- if (fflush (stdout) != 0)
|
||||
- error (EXIT_FAILURE, errno, _("write error"));
|
||||
+ check_fspec (fspec, ev->wd, &prev_wd);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1602,7 +1721,7 @@ tail_file (struct File_spec *f, uintmax_
|
||||
/* Before the tail function provided `read_pos', there was
|
||||
a race condition described in the URL below. This sleep
|
||||
call made the window big enough to exercise the problem. */
|
||||
- sleep (1);
|
||||
+ xnanosleep (1);
|
||||
#endif
|
||||
f->errnum = ok - 1;
|
||||
if (fstat (fd, &stats) < 0)
|
||||
@@ -1632,6 +1751,7 @@ tail_file (struct File_spec *f, uintmax_
|
||||
to avoid a race condition described by Ken Raeburn:
|
||||
http://mail.gnu.org/archive/html/bug-textutils/2003-05/msg00007.html */
|
||||
record_open_fd (f, fd, read_pos, &stats, (is_stdin ? -1 : 1));
|
||||
+ f->remote = fremote (fd, pretty_name (f));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1872,6 +1992,35 @@ parse_options (int argc, char **argv,
|
||||
}
|
||||
}
|
||||
|
||||
+/* Mark as '.ignore'd each member of F that corresponds to a
|
||||
+ pipe or fifo, and return the number of non-ignored members. */
|
||||
+static size_t
|
||||
+ignore_fifo_and_pipe (struct File_spec *f, size_t n_files)
|
||||
+{
|
||||
+ /* When there is no FILE operand and stdin is a pipe or FIFO
|
||||
+ POSIX requires that tail ignore the -f option.
|
||||
+ Since we allow multiple FILE operands, we extend that to say: with -f,
|
||||
+ ignore any "-" operand that corresponds to a pipe or FIFO. */
|
||||
+ size_t n_viable = 0;
|
||||
+
|
||||
+ size_t i;
|
||||
+ for (i = 0; i < n_files; i++)
|
||||
+ {
|
||||
+ bool is_a_fifo_or_pipe =
|
||||
+ (STREQ (f[i].name, "-")
|
||||
+ && !f[i].ignore
|
||||
+ && 0 <= f[i].fd
|
||||
+ && (S_ISFIFO (f[i].mode)
|
||||
+ || (HAVE_FIFO_PIPES != 1 && isapipe (f[i].fd))));
|
||||
+ if (is_a_fifo_or_pipe)
|
||||
+ f[i].ignore = true;
|
||||
+ else
|
||||
+ ++n_viable;
|
||||
+ }
|
||||
+
|
||||
+ return n_viable;
|
||||
+}
|
||||
+
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
@@ -1963,41 +2112,31 @@ main (int argc, char **argv)
|
||||
for (i = 0; i < n_files; i++)
|
||||
ok &= tail_file (&F[i], n_units);
|
||||
|
||||
- /* When there is no FILE operand and stdin is a pipe or FIFO
|
||||
- POSIX requires that tail ignore the -f option.
|
||||
- Since we allow multiple FILE operands, we extend that to say:
|
||||
- ignore any "-" operand that corresponds to a pipe or FIFO. */
|
||||
- size_t n_viable = 0;
|
||||
- for (i = 0; i < n_files; i++)
|
||||
- {
|
||||
- bool is_a_fifo_or_pipe =
|
||||
- (STREQ (F[i].name, "-")
|
||||
- && !F[i].ignore
|
||||
- && 0 <= F[i].fd
|
||||
- && (S_ISFIFO (F[i].mode)
|
||||
- || (HAVE_FIFO_PIPES != 1 && isapipe (F[i].fd))));
|
||||
- if (is_a_fifo_or_pipe)
|
||||
- F[i].ignore = true;
|
||||
- else
|
||||
- ++n_viable;
|
||||
- }
|
||||
-
|
||||
- if (forever && n_viable)
|
||||
+ if (forever && ignore_fifo_and_pipe (F, n_files))
|
||||
{
|
||||
#if HAVE_INOTIFY
|
||||
- /* If the user specifies stdin via a command line argument of "-",
|
||||
- or implicitly by providing no arguments, we won't use inotify.
|
||||
+ /* tailable_stdin() checks if the user specifies stdin via "-",
|
||||
+ or implicitly by providing no arguments. If so, we won't use inotify.
|
||||
Technically, on systems with a working /dev/stdin, we *could*,
|
||||
but would it be worth it? Verifying that it's a real device
|
||||
and hooked up to stdin is not trivial, while reverting to
|
||||
- non-inotify-based tail_forever is easy and portable. */
|
||||
- bool stdin_cmdline_arg = false;
|
||||
+ non-inotify-based tail_forever is easy and portable.
|
||||
|
||||
- for (i = 0; i < n_files; i++)
|
||||
- if (!F[i].ignore && STREQ (F[i].name, "-"))
|
||||
- stdin_cmdline_arg = true;
|
||||
+ any_remote_file() checks if the user has specified any
|
||||
+ files that reside on remote file systems. inotify is not used
|
||||
+ in this case because it would miss any updates to the file
|
||||
+ that were not initiated from the local system.
|
||||
+
|
||||
+ FIXME: inotify doesn't give any notification when a new
|
||||
+ (remote) file or directory is mounted on top a watched file.
|
||||
+ When follow_mode == Follow_name we would ideally like to detect that.
|
||||
+ Note if there is a change to the original file then we'll
|
||||
+ recheck it and follow the new file, or ignore it if the
|
||||
+ file has changed to being remote. */
|
||||
+ if (tailable_stdin (F, n_files) || any_remote_file (F, n_files))
|
||||
+ disable_inotify = true;
|
||||
|
||||
- if (!disable_inotify && !stdin_cmdline_arg)
|
||||
+ if (!disable_inotify)
|
||||
{
|
||||
int wd = inotify_init ();
|
||||
if (wd < 0)
|
||||
30
coreutils-7.6-trueexecve.patch
Normal file
30
coreutils-7.6-trueexecve.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
diff -urNp coreutils-7.6-orig/src/true.c coreutils-7.6/src/true.c
|
||||
--- coreutils-7.6-orig/src/true.c 2009-09-01 13:01:16.000000000 +0200
|
||||
+++ coreutils-7.6/src/true.c 2009-11-18 15:00:22.000000000 +0100
|
||||
@@ -54,18 +54,19 @@ Usage: %s [ignored command line argument
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
- initialize_main (&argc, &argv);
|
||||
- set_program_name (argv[0]);
|
||||
- setlocale (LC_ALL, "");
|
||||
- bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
- textdomain (PACKAGE);
|
||||
-
|
||||
- atexit (close_stdout);
|
||||
|
||||
/* Recognize --help or --version only if it's the only command-line
|
||||
argument. */
|
||||
if (argc == 2)
|
||||
{
|
||||
+ initialize_main (&argc, &argv);
|
||||
+ set_program_name (argv[0]);
|
||||
+ setlocale (LC_ALL, "");
|
||||
+ bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
+ textdomain (PACKAGE);
|
||||
+
|
||||
+ atexit (close_stdout);
|
||||
+
|
||||
if (STREQ (argv[1], "--help"))
|
||||
usage (EXIT_STATUS);
|
||||
|
||||
75
coreutils-7.6-who-msgstatus.patch
Normal file
75
coreutils-7.6-who-msgstatus.patch
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
diff -urNp coreutils-7.6-orig/m4/jm-macros.m4 coreutils-7.6/m4/jm-macros.m4
|
||||
--- coreutils-7.6-orig/m4/jm-macros.m4 2010-04-28 17:44:36.000000000 +0200
|
||||
+++ coreutils-7.6/m4/jm-macros.m4 2010-04-28 17:45:01.000000000 +0200
|
||||
@@ -146,6 +146,25 @@ AC_DEFUN([coreutils_MACROS],
|
||||
])
|
||||
|
||||
AC_REQUIRE([AM_LANGINFO_CODESET])
|
||||
+
|
||||
+ # Accept configure options: --with-tty-group[=GROUP], --without-tty-group
|
||||
+ # You can determine the group of a TTY via 'stat --format %G /dev/tty'
|
||||
+ # Omitting this option is equivalent to using --without-tty-group.
|
||||
+ AC_ARG_WITH([tty-group],
|
||||
+ AS_HELP_STRING([--with-tty-group[[[=NAME]]]],
|
||||
+ [group used by system for TTYs, "tty" when not specified]
|
||||
+ [ (default: do not rely on any group used for TTYs)]),
|
||||
+ [tty_group_name=$withval],
|
||||
+ [tty_group_name=no])
|
||||
+
|
||||
+ if test "x$tty_group_name" != xno; then
|
||||
+ if test "x$tty_group_name" = xyes; then
|
||||
+ tty_group_name=tty
|
||||
+ fi
|
||||
+ AC_MSG_NOTICE([TTY group used by system set to "$tty_group_name"])
|
||||
+ AC_DEFINE_UNQUOTED([TTY_GROUP_NAME], ["$tty_group_name"],
|
||||
+ [group used by system for TTYs])
|
||||
+ fi
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_CHECK_ALL_HEADERS],
|
||||
diff -urNp coreutils-7.6-orig/src/who.c coreutils-7.6/src/who.c
|
||||
--- coreutils-7.6-orig/src/who.c 2010-04-28 17:44:36.000000000 +0200
|
||||
+++ coreutils-7.6/src/who.c 2010-04-28 17:45:01.000000000 +0200
|
||||
@@ -36,6 +36,10 @@
|
||||
#include "error.h"
|
||||
#include "quote.h"
|
||||
|
||||
+#ifdef TTY_GROUP_NAME
|
||||
+# include <grp.h>
|
||||
+#endif
|
||||
+
|
||||
/* The official name of this program (e.g., no `g' prefix). */
|
||||
#define PROGRAM_NAME "who"
|
||||
|
||||
@@ -307,6 +311,22 @@ print_line (int userlen, const char *use
|
||||
free (x_exitstr);
|
||||
}
|
||||
|
||||
+/* Return true if a terminal device given as PSTAT allows other users
|
||||
+ to send messages to; false otherwise */
|
||||
+static bool
|
||||
+is_tty_writable (struct stat const *pstat)
|
||||
+{
|
||||
+#ifdef TTY_GROUP_NAME
|
||||
+ /* Ensure the group of the TTY device matches TTY_GROUP_NAME, more info at
|
||||
+ https://bugzilla.redhat.com/454261 */
|
||||
+ struct group *ttygr = getgrnam (TTY_GROUP_NAME);
|
||||
+ if (!ttygr || (pstat->st_gid != ttygr->gr_gid))
|
||||
+ return false;
|
||||
+#endif
|
||||
+
|
||||
+ return pstat->st_mode & S_IWGRP;
|
||||
+}
|
||||
+
|
||||
/* Send properly parsed USER_PROCESS info to print_line. The most
|
||||
recent boot time is BOOTTIME. */
|
||||
static void
|
||||
@@ -345,7 +365,7 @@ print_user (const STRUCT_UTMP *utmp_ent,
|
||||
|
||||
if (stat (line, &stats) == 0)
|
||||
{
|
||||
- mesg = (stats.st_mode & S_IWGRP) ? '+' : '-';
|
||||
+ mesg = is_tty_writable (&stats) ? '+' : '-';
|
||||
last_change = stats.st_atime;
|
||||
}
|
||||
else
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
From 6880c3dc9098b3337612850d1500b474aeb944ca Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Tue, 29 Aug 2017 17:33:51 +0200
|
||||
Subject: [PATCH] require_selinux_(): use selinuxenabled(8) if available
|
||||
|
||||
---
|
||||
init.cfg | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/init.cfg b/init.cfg
|
||||
index af6b581..f887b3a 100644
|
||||
--- a/init.cfg
|
||||
+++ b/init.cfg
|
||||
@@ -114,6 +114,9 @@ require_selinux_()
|
||||
grep 'selinuxfs$' /proc/filesystems > /dev/null \
|
||||
|| skip_ "this system lacks SELinux support"
|
||||
|
||||
+ # use the 'selinuxenabled' utility if available
|
||||
+ selinuxenabled; [ $? = 1 ] && skip_ "SELinux is disabled"
|
||||
+
|
||||
# Independent of whether SELinux is enabled system-wide,
|
||||
# the current file system may lack SELinux support.
|
||||
# Also the current build may have SELinux support disabled.
|
||||
--
|
||||
2.9.5
|
||||
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
From 0d04ee8ddedb2bf33d64f148f246a3b7ec4fef21 Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Mon, 23 Jan 2017 12:35:41 +0100
|
||||
Subject: [PATCH] test-lock: disable the rwlock test
|
||||
|
||||
It hangs indefinitely if the system rwlock implementation does not
|
||||
prevent writer starvation (and glibc does not implement it).
|
||||
|
||||
Bug: http://www.mail-archive.com/bug-gnulib@gnu.org/msg33017.html
|
||||
---
|
||||
gnulib-tests/test-lock.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gnulib-tests/test-lock.c b/gnulib-tests/test-lock.c
|
||||
index aa6de27..5af0a6c 100644
|
||||
--- a/gnulib-tests/test-lock.c
|
||||
+++ b/gnulib-tests/test-lock.c
|
||||
@@ -42,7 +42,7 @@
|
||||
Uncomment some of these, to verify that all tests crash if no locking
|
||||
is enabled. */
|
||||
#define DO_TEST_LOCK 1
|
||||
-#define DO_TEST_RWLOCK 1
|
||||
+#define DO_TEST_RWLOCK 0
|
||||
#define DO_TEST_RECURSIVE_LOCK 1
|
||||
#define DO_TEST_ONCE 1
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
From bca11e30e8a6281a8cbddc9fb196dd86ab09c955 Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Fri, 17 Jun 2016 16:58:18 +0200
|
||||
Subject: [PATCH] downstream changes to default DIR_COLORS
|
||||
|
||||
---
|
||||
DIR_COLORS | 9 ++++++++-
|
||||
DIR_COLORS.lightbgcolor | 21 +++++++++++++++------
|
||||
2 files changed, 23 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/DIR_COLORS b/DIR_COLORS
|
||||
index 540f6cd..b4785b6 100644
|
||||
--- a/DIR_COLORS
|
||||
+++ b/DIR_COLORS
|
||||
@@ -1,3 +1,7 @@
|
||||
+# This file goes in the /etc directory, and must be world readable.
|
||||
+# You can override the system defaults by making a copy of this file
|
||||
+# as ~/.dir_colors
|
||||
+
|
||||
# Configuration file for dircolors, a utility to help you set the
|
||||
# LS_COLORS environment variable used by GNU ls with the --color option.
|
||||
|
||||
@@ -11,6 +15,9 @@
|
||||
|
||||
# Global config options can be specified before TERM or COLORTERM entries
|
||||
|
||||
+# For compatibility, the pattern "^COLOR.*none" is recognized as a way to
|
||||
+# disable colorization. See https://bugzilla.redhat.com/1349579 for details.
|
||||
+
|
||||
# ===================================================================
|
||||
# Terminal filters
|
||||
# ===================================================================
|
||||
@@ -70,7 +77,7 @@ DOOR 01;35 # door
|
||||
BLK 40;33;01 # block device driver
|
||||
CHR 40;33;01 # character device driver
|
||||
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
|
||||
-MISSING 00 # ... and the files they point to
|
||||
+MISSING 01;37;41 # ... and the files they point to
|
||||
SETUID 37;41 # regular file that is setuid (u+s)
|
||||
SETGID 30;43 # regular file that is setgid (g+s)
|
||||
CAPABILITY 00 # regular file with capability (very expensive to lookup)
|
||||
diff --git a/DIR_COLORS.lightbgcolor b/DIR_COLORS.lightbgcolor
|
||||
index e3b0ec3..39a0a4c 100644
|
||||
--- a/DIR_COLORS.lightbgcolor
|
||||
+++ b/DIR_COLORS.lightbgcolor
|
||||
@@ -1,3 +1,9 @@
|
||||
+# Configuration file for the color ls utility - modified for lighter backgrounds
|
||||
+
|
||||
+# This file goes in the /etc directory, and must be world readable.
|
||||
+# You can override the system defaults by making a copy of this file
|
||||
+# as ~/.dir_colors
|
||||
+
|
||||
# Configuration file for dircolors, a utility to help you set the
|
||||
# LS_COLORS environment variable used by GNU ls with the --color option.
|
||||
|
||||
@@ -11,6 +17,9 @@
|
||||
|
||||
# Global config options can be specified before TERM or COLORTERM entries
|
||||
|
||||
+# For compatibility, the pattern "^COLOR.*none" is recognized as a way to
|
||||
+# disable colorization. See https://bugzilla.redhat.com/1349579 for details.
|
||||
+
|
||||
# ===================================================================
|
||||
# Terminal filters
|
||||
# ===================================================================
|
||||
@@ -60,17 +69,17 @@ TERM xterm*
|
||||
#NORMAL 00 # no color code at all
|
||||
#FILE 00 # regular file: use no color at all
|
||||
RESET 0 # reset to "normal" color
|
||||
-DIR 01;34 # directory
|
||||
-LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
|
||||
+DIR 00;34 # directory
|
||||
+LINK 00;36 # symbolic link. (If you set this to 'target' instead of a
|
||||
# numerical value, the color is as for the file pointed to.)
|
||||
MULTIHARDLINK 00 # regular file with more than one link
|
||||
FIFO 40;33 # pipe
|
||||
-SOCK 01;35 # socket
|
||||
-DOOR 01;35 # door
|
||||
+SOCK 00;35 # socket
|
||||
+DOOR 00;35 # door
|
||||
BLK 40;33;01 # block device driver
|
||||
CHR 40;33;01 # character device driver
|
||||
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
|
||||
-MISSING 00 # ... and the files they point to
|
||||
+MISSING 01;37;41 # ... and the files they point to
|
||||
SETUID 37;41 # regular file that is setuid (u+s)
|
||||
SETGID 30;43 # regular file that is setgid (g+s)
|
||||
CAPABILITY 00 # regular file with capability (very expensive to lookup)
|
||||
@@ -79,7 +88,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
|
||||
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
|
||||
|
||||
# This is for regular files with execute permission:
|
||||
-EXEC 01;32
|
||||
+EXEC 00;32
|
||||
|
||||
# ===================================================================
|
||||
# File extension attributes
|
||||
--
|
||||
2.49.0
|
||||
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
From 95044cb5eaea83d02f768feb5ab79fcf5e6ad782 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
||||
Date: Mon, 22 Dec 2025 17:12:48 +0000
|
||||
Subject: [PATCH] tests: avoid false failure due to ulimit on aarch64
|
||||
|
||||
* tests/cut/cut-huge-range.sh: Add an extra 1MiB headroom,
|
||||
which was seen with aarch64.
|
||||
Reported at https://bugzilla.redhat.com/2424302
|
||||
|
||||
Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com>
|
||||
Upstream-commit: 95044cb5eaea83d02f768feb5ab79fcf5e6ad782
|
||||
---
|
||||
tests/cut/cut-huge-range.sh | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tests/cut/cut-huge-range.sh b/tests/cut/cut-huge-range.sh
|
||||
index 4bd1b129d8..98d7e8f0b9 100755
|
||||
--- a/tests/cut/cut-huge-range.sh
|
||||
+++ b/tests/cut/cut-huge-range.sh
|
||||
@@ -22,6 +22,7 @@ getlimits_
|
||||
|
||||
vm=$(get_min_ulimit_v_ returns_ 0 cut -b1 /dev/null) \
|
||||
|| skip_ 'shell lacks ulimit, or ASAN enabled'
|
||||
+vm=$(($vm+1000)) # https://bugzilla.redhat.com/2424302
|
||||
|
||||
# Ensure we can cut up to our sentinel value.
|
||||
# Don't use expr to subtract one,
|
||||
|
||||
|
|
@ -1,169 +0,0 @@
|
|||
From 891761bca1aa78336e5b18c121075b6e4696c5d4 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Sun, 23 Nov 2025 00:50:40 -0800
|
||||
Subject: [PATCH] Port to C23 qualifier-generic fns like strchr
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This ports Gnulib to strict C23 platforms that reject code
|
||||
like ‘char *q = strchr (P, 'x');’ when P is a pointer to const,
|
||||
because in C23 strchr is a qualifier-generic function so
|
||||
strchr (P, 'x') returns char const *.
|
||||
This patch does not attempt to do the following two things,
|
||||
which might be useful in the future:
|
||||
1. When compiling on non-C23 platforms, check user code for
|
||||
portability to platforms that define qualifier-generic functions.
|
||||
2. Port Gnulib to platforms that have qualifier-generic functions
|
||||
not listed in the C23 standard, e.g., strchrnul. I don’t know
|
||||
of any such platforms.
|
||||
* lib/mbschr.c (mbschr):
|
||||
* lib/memchr2.c (memchr2):
|
||||
Port to C23, where functions like strchr are qualifier-generic.
|
||||
* lib/c++defs.h (_GL_FUNCDECL_SYS_NAME): New macro.
|
||||
* lib/c++defs.h (_GL_FUNCDECL_SYS):
|
||||
* lib/stdlib.in.h (bsearch):
|
||||
Use it, to prevent C23 names like strchr from acting like macros.
|
||||
* lib/string.in.h (memchr, strchr, strpbrk, strrchr):
|
||||
Do not #undef when GNULIB_POSIXCHECK is defined, as this could
|
||||
cause conforming C23 code to fail to conform. It’s not clear why
|
||||
_GL_WARN_ON_USE_CXX; perhaps it was needed but isn’t any more?
|
||||
But for now, limit the removal of #undef to these four functions
|
||||
where #undeffing is clearly undesirable in C23.
|
||||
* lib/wchar.in.h (wmemchr): Parenthesize function name in decl,
|
||||
to prevent it from acting like a macro.
|
||||
|
||||
Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com>
|
||||
Upstream-commit: df17f4f37ed3ca373d23ad42eae51122bdb96626
|
||||
---
|
||||
lib/c++defs.h | 12 +++++++++++-
|
||||
lib/mbschr.c | 2 +-
|
||||
lib/memchr2.c | 2 +-
|
||||
lib/stdlib.in.h | 6 +++---
|
||||
lib/string.in.h | 4 ----
|
||||
lib/wchar.in.h | 2 +-
|
||||
6 files changed, 17 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/lib/c++defs.h b/lib/c++defs.h
|
||||
index b77979a..7384457 100644
|
||||
--- a/lib/c++defs.h
|
||||
+++ b/lib/c++defs.h
|
||||
@@ -127,6 +127,16 @@
|
||||
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
|
||||
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
|
||||
|
||||
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
|
||||
+ parenthsized func otherwise. Parenthesization is needed in C23 if
|
||||
+ the function is like strchr and so is a qualifier-generic macro
|
||||
+ that expands to something more complicated. */
|
||||
+#ifdef __cplusplus
|
||||
+# define _GL_FUNCDECL_SYS_NAME(func) func
|
||||
+#else
|
||||
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
|
||||
+#endif
|
||||
+
|
||||
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
|
||||
declares the system function, named func, with the given prototype,
|
||||
consisting of return type, parameters, and attributes.
|
||||
@@ -139,7 +149,7 @@
|
||||
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
|
||||
*/
|
||||
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
|
||||
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
|
||||
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
|
||||
|
||||
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
|
||||
declares a C++ alias called GNULIB_NAMESPACE::func
|
||||
diff --git a/lib/mbschr.c b/lib/mbschr.c
|
||||
index c9e14b5..6582134 100644
|
||||
--- a/lib/mbschr.c
|
||||
+++ b/lib/mbschr.c
|
||||
@@ -65,5 +65,5 @@ mbschr (const char *string, int c)
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
- return strchr (string, c);
|
||||
+ return (char *) strchr (string, c);
|
||||
}
|
||||
diff --git a/lib/memchr2.c b/lib/memchr2.c
|
||||
index 7493823..d7724ae 100644
|
||||
--- a/lib/memchr2.c
|
||||
+++ b/lib/memchr2.c
|
||||
@@ -55,7 +55,7 @@ memchr2 (void const *s, int c1_in, int c2_in, size_t n)
|
||||
c2 = (unsigned char) c2_in;
|
||||
|
||||
if (c1 == c2)
|
||||
- return memchr (s, c1, n);
|
||||
+ return (void *) memchr (s, c1, n);
|
||||
|
||||
/* Handle the first few bytes by reading one byte at a time.
|
||||
Do this until VOID_PTR is aligned on a longword boundary. */
|
||||
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
|
||||
index bef0aaa..fd0e1e0 100644
|
||||
--- a/lib/stdlib.in.h
|
||||
+++ b/lib/stdlib.in.h
|
||||
@@ -224,9 +224,9 @@ _GL_INLINE_HEADER_BEGIN
|
||||
|
||||
/* Declarations for ISO C N3322. */
|
||||
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
|
||||
-_GL_EXTERN_C void *bsearch (const void *__key,
|
||||
- const void *__base, size_t __nmemb, size_t __size,
|
||||
- int (*__compare) (const void *, const void *))
|
||||
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
|
||||
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
|
||||
+ int (*__compare) (const void *, const void *))
|
||||
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
|
||||
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
|
||||
int (*__compare) (const void *, const void *))
|
||||
diff --git a/lib/string.in.h b/lib/string.in.h
|
||||
index fdcdd21..8b56acf 100644
|
||||
--- a/lib/string.in.h
|
||||
+++ b/lib/string.in.h
|
||||
@@ -409,7 +409,6 @@ _GL_CXXALIASWARN1 (memchr, void const *,
|
||||
_GL_CXXALIASWARN (memchr);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
-# undef memchr
|
||||
/* Assume memchr is always declared. */
|
||||
_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
|
||||
"use gnulib module memchr for portability" );
|
||||
@@ -674,7 +673,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
|
||||
#if defined GNULIB_POSIXCHECK
|
||||
/* strchr() does not work with multibyte strings if the locale encoding is
|
||||
GB18030 and the character to be searched is a digit. */
|
||||
-# undef strchr
|
||||
/* Assume strchr is always declared. */
|
||||
_GL_WARN_ON_USE_CXX (strchr,
|
||||
const char *, char *, (const char *, int),
|
||||
@@ -981,7 +979,6 @@ _GL_CXXALIASWARN (strpbrk);
|
||||
Even in this simple case, it does not work with multibyte strings if the
|
||||
locale encoding is GB18030 and one of the characters to be searched is a
|
||||
digit. */
|
||||
-# undef strpbrk
|
||||
_GL_WARN_ON_USE_CXX (strpbrk,
|
||||
const char *, char *, (const char *, const char *),
|
||||
"strpbrk cannot work correctly on character strings "
|
||||
@@ -1011,7 +1008,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
|
||||
#if defined GNULIB_POSIXCHECK
|
||||
/* strrchr() does not work with multibyte strings if the locale encoding is
|
||||
GB18030 and the character to be searched is a digit. */
|
||||
-# undef strrchr
|
||||
/* Assume strrchr is always declared. */
|
||||
_GL_WARN_ON_USE_CXX (strrchr,
|
||||
const char *, char *, (const char *, int),
|
||||
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
|
||||
index ab602a2..6be4515 100644
|
||||
--- a/lib/wchar.in.h
|
||||
+++ b/lib/wchar.in.h
|
||||
@@ -301,7 +301,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)
|
||||
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
|
||||
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
|
||||
# ifndef __cplusplus
|
||||
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
|
||||
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
|
||||
# endif
|
||||
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
|
||||
--
|
||||
2.52.0
|
||||
|
||||
67
coreutils-CVE-2009-4135.patch
Normal file
67
coreutils-CVE-2009-4135.patch
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
diff -urNp coreutils-7.6-orig/dist-check.mk coreutils-7.6/dist-check.mk
|
||||
--- coreutils-7.6-orig/dist-check.mk 2009-09-01 13:01:16.000000000 +0200
|
||||
+++ coreutils-7.6/dist-check.mk 2009-12-11 19:25:01.231452251 +0100
|
||||
@@ -4,14 +4,14 @@ bin=bin-$$$$
|
||||
|
||||
write_loser = printf '\#!%s\necho $$0: bad path 1>&2; exit 1\n' '$(SHELL)'
|
||||
|
||||
-TMPDIR ?= /tmp
|
||||
-t=$(TMPDIR)/$(PACKAGE)/test
|
||||
+tmpdir = $(abs_top_builddir)/tests/torture
|
||||
+t=$(tmpdir)/$(PACKAGE)/test
|
||||
pfx=$(t)/i
|
||||
|
||||
# More than once, tainted build and source directory names would
|
||||
# have caused at least one "make check" test to apply "chmod 700"
|
||||
# to all directories under $HOME. Make sure it doesn't happen again.
|
||||
-tp := $(shell echo "$(TMPDIR)/$(PACKAGE)-$$$$")
|
||||
+tp = $(tmpdir)/taint
|
||||
t_prefix = $(tp)/a
|
||||
t_taint = '$(t_prefix) b'
|
||||
fake_home = $(tp)/home
|
||||
@@ -30,10 +30,11 @@ taint-distcheck: $(DIST_ARCHIVES)
|
||||
touch $(fake_home)/f
|
||||
mkdir -p $(fake_home)/d/e
|
||||
ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-before
|
||||
+ HOME=$(fake_home); export HOME; \
|
||||
cd $(t_taint)/$(distdir) \
|
||||
&& ./configure \
|
||||
&& $(MAKE) \
|
||||
- && HOME=$(fake_home) $(MAKE) check \
|
||||
+ && $(MAKE) check \
|
||||
&& ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-after \
|
||||
&& diff $(tp)/.ls-before $(tp)/.ls-after \
|
||||
&& test -d $(t_prefix)
|
||||
@@ -52,6 +53,7 @@ endef
|
||||
# Install, then verify that all binaries and man pages are in place.
|
||||
# Note that neither the binary, ginstall, nor the ].1 man page is installed.
|
||||
define my-instcheck
|
||||
+ echo running my-instcheck; \
|
||||
$(MAKE) prefix=$(pfx) install \
|
||||
&& test ! -f $(pfx)/bin/ginstall \
|
||||
&& { fail=0; \
|
||||
@@ -70,6 +72,7 @@ endef
|
||||
|
||||
define coreutils-path-check
|
||||
{ \
|
||||
+ echo running coreutils-path-check; \
|
||||
if test -f $(srcdir)/src/true.c; then \
|
||||
fail=1; \
|
||||
mkdir $(bin) \
|
||||
@@ -117,7 +120,7 @@ my-distcheck: $(DIST_ARCHIVES) $(local-c
|
||||
mkdir -p $(t)
|
||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
cd $(t)/$(distdir) \
|
||||
- && ./configure --enable-gcc-warnings --disable-nls \
|
||||
+ && ./configure --quiet --enable-gcc-warnings --disable-nls \
|
||||
&& $(MAKE) AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(install-transform-check) \
|
||||
@@ -128,6 +131,7 @@ my-distcheck: $(DIST_ARCHIVES) $(local-c
|
||||
&& $(AMTAR) -zxf - ) < $(distdir).tar.gz
|
||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
||||
-rm -rf $(t)
|
||||
+ rmdir $(tmpdir)/$(PACKAGE) $(tmpdir)
|
||||
@echo "========================"; \
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
213
coreutils-DIR_COLORS
Normal file
213
coreutils-DIR_COLORS
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
# Configuration file for the color ls utility
|
||||
# Synchronized with coreutils 8.5 dircolors
|
||||
# This file goes in the /etc directory, and must be world readable.
|
||||
# You can copy this file to .dir_colors in your $HOME directory to override
|
||||
# the system defaults.
|
||||
|
||||
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
|
||||
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
|
||||
# off.
|
||||
COLOR tty
|
||||
|
||||
# Extra command line options for ls go here.
|
||||
# Basically these ones are:
|
||||
# -F = show '/' for dirs, '*' for executables, etc.
|
||||
# -T 0 = don't trust tab spacing when formatting ls output.
|
||||
OPTIONS -F -T 0
|
||||
|
||||
# Below, there should be one TERM entry for each termtype that is colorizable
|
||||
TERM Eterm
|
||||
TERM ansi
|
||||
TERM color-xterm
|
||||
TERM con132x25
|
||||
TERM con132x30
|
||||
TERM con132x43
|
||||
TERM con132x60
|
||||
TERM con80x25
|
||||
TERM con80x28
|
||||
TERM con80x30
|
||||
TERM con80x43
|
||||
TERM con80x50
|
||||
TERM con80x60
|
||||
TERM cons25
|
||||
TERM console
|
||||
TERM cygwin
|
||||
TERM dtterm
|
||||
TERM eterm-color
|
||||
TERM gnome
|
||||
TERM gnome-256color
|
||||
TERM jfbterm
|
||||
TERM konsole
|
||||
TERM kterm
|
||||
TERM linux
|
||||
TERM linux-c
|
||||
TERM mach-color
|
||||
TERM mlterm
|
||||
TERM putty
|
||||
TERM rxvt
|
||||
TERM rxvt-256color
|
||||
TERM rxvt-cygwin
|
||||
TERM rxvt-cygwin-native
|
||||
TERM rxvt-unicode
|
||||
TERM rxvt-unicode256
|
||||
TERM screen
|
||||
TERM screen-256color
|
||||
TERM screen-256color-bce
|
||||
TERM screen-bce
|
||||
TERM screen-w
|
||||
TERM screen.linux
|
||||
TERM vt100
|
||||
TERM xterm
|
||||
TERM xterm-16color
|
||||
TERM xterm-256color
|
||||
TERM xterm-88color
|
||||
TERM xterm-color
|
||||
TERM xterm-debian
|
||||
|
||||
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
|
||||
EIGHTBIT 1
|
||||
|
||||
# Below are the color init strings for the basic file types. A color init
|
||||
# string consists of one or more of the following numeric codes:
|
||||
# Attribute codes:
|
||||
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
|
||||
# Text color codes:
|
||||
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
|
||||
# Background color codes:
|
||||
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
||||
#NORMAL 00 # no color code at all
|
||||
#FILE 00 # normal file, use no color at all
|
||||
RESET 0 # reset to "normal" color
|
||||
DIR 01;34 # directory
|
||||
LINK 01;36 # symbolic link (If you set this to 'target' instead of a
|
||||
# numerical value, the color is as for the file pointed to.)
|
||||
MULTIHARDLINK 00 # regular file with more than one link
|
||||
FIFO 40;33 # pipe
|
||||
SOCK 01;35 # socket
|
||||
DOOR 01;35 # door
|
||||
BLK 40;33;01 # block device driver
|
||||
CHR 40;33;01 # character device driver
|
||||
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file
|
||||
MISSING 01;05;37;41 # ... and the files they point to
|
||||
SETUID 37;41 # file that is setuid (u+s)
|
||||
SETGID 30;43 # file that is setgid (g+s)
|
||||
CAPABILITY 30;41 # file with capability
|
||||
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
|
||||
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
|
||||
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
|
||||
|
||||
# This is for files with execute permission:
|
||||
EXEC 01;32
|
||||
|
||||
# List any file extensions like '.gz' or '.tar' that you would like ls
|
||||
# to colorize below. Put the extension, a space, and the color init string.
|
||||
# (and any comments you want to add after a '#')
|
||||
# executables (bright green)
|
||||
#.cmd 01;32
|
||||
#.exe 01;32
|
||||
#.com 01;32
|
||||
#.btm 01;32
|
||||
#.bat 01;32
|
||||
#.sh 01;32
|
||||
#.csh 01;32
|
||||
# archives or compressed (bright red)
|
||||
.tar 01;31
|
||||
.tgz 01;31
|
||||
.arj 01;31
|
||||
.taz 01;31
|
||||
.lzh 01;31
|
||||
.lzma 01;31
|
||||
.tlz 01;31
|
||||
.txz 01;31
|
||||
.zip 01;31
|
||||
.z 01;31
|
||||
.Z 01;31
|
||||
.dz 01;31
|
||||
.gz 01;31
|
||||
.lz 01;31
|
||||
.xz 01;31
|
||||
.bz2 01;31
|
||||
.tbz 01;31
|
||||
.tbz2 01;31
|
||||
.bz 01;31
|
||||
.tz 01;31
|
||||
.deb 01;31
|
||||
.rpm 01;31
|
||||
.jar 01;31
|
||||
.rar 01;31
|
||||
.ace 01;31
|
||||
.zoo 01;31
|
||||
.cpio 01;31
|
||||
.7z 01;31
|
||||
.rz 01;31
|
||||
|
||||
# image formats (magenta)
|
||||
.jpg 01;35
|
||||
.jpeg 01;35
|
||||
.gif 01;35
|
||||
.bmp 01;35
|
||||
.pbm 01;35
|
||||
.pgm 01;35
|
||||
.ppm 01;35
|
||||
.tga 01;35
|
||||
.xbm 01;35
|
||||
.xpm 01;35
|
||||
.tif 01;35
|
||||
.tiff 01;35
|
||||
.png 01;35
|
||||
.svg 01;35
|
||||
.svgz 01;35
|
||||
.mng 01;35
|
||||
.pcx 01;35
|
||||
.mov 01;35
|
||||
.mpg 01;35
|
||||
.mpeg 01;35
|
||||
.m2v 01;35
|
||||
.mkv 01;35
|
||||
.ogm 01;35
|
||||
.mp4 01;35
|
||||
.m4v 01;35
|
||||
.mp4v 01;35
|
||||
.vob 01;35
|
||||
.qt 01;35
|
||||
.nuv 01;35
|
||||
.wmv 01;35
|
||||
.asf 01;35
|
||||
.rm 01;35
|
||||
.rmvb 01;35
|
||||
.flc 01;35
|
||||
.avi 01;35
|
||||
.fli 01;35
|
||||
.flv 01;35
|
||||
.gl 01;35
|
||||
.dl 01;35
|
||||
.xcf 01;35
|
||||
.xwd 01;35
|
||||
.yuv 01;35
|
||||
.cgm 01;35
|
||||
.emf 01;35
|
||||
|
||||
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
|
||||
.axv 01;35
|
||||
.anx 01;35
|
||||
.ogv 01;35
|
||||
.ogx 01;35
|
||||
|
||||
# audio formats (cyan)
|
||||
.aac 01;36
|
||||
.au 01;36
|
||||
.flac 01;36
|
||||
.mid 01;36
|
||||
.midi 01;36
|
||||
.mka 01;36
|
||||
.mp3 01;36
|
||||
.mpc 01;36
|
||||
.ogg 01;36
|
||||
.ra 01;36
|
||||
.wav 01;36
|
||||
|
||||
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
|
||||
.axa 01;36
|
||||
.oga 01;36
|
||||
.spx 01;36
|
||||
.xspf 01;36
|
||||
188
coreutils-DIR_COLORS.256color
Normal file
188
coreutils-DIR_COLORS.256color
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
# Configuration file for the 256color ls utility
|
||||
# This file goes in the /etc directory, and must be world readable.
|
||||
# Synchronized with coreutils 8.5 dircolors
|
||||
# You can copy this file to .dir_colors in your $HOME directory to override
|
||||
# the system defaults.
|
||||
# In the case that you are not satisfied with supplied colors, please
|
||||
# submit your color configuration or attach your file with colors readable
|
||||
# on ALL color background schemas (white,gray,black) to RedHat Bugzilla
|
||||
# ticket on https://bugzilla.redhat.com/show_bug.cgi?id=429121 . TIA.
|
||||
# Please just keep ls color conventions from 8 color scheme.
|
||||
|
||||
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
|
||||
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
|
||||
# off.
|
||||
COLOR tty
|
||||
|
||||
# Extra command line options for ls go here.
|
||||
# Basically these ones are:
|
||||
# -F = show '/' for dirs, '*' for executables, etc.
|
||||
# -T 0 = don't trust tab spacing when formatting ls output.
|
||||
OPTIONS -F -T 0
|
||||
|
||||
# Below, there should be one TERM entry for each termtype that is colorizable
|
||||
TERM putty-256color
|
||||
TERM rxvt-256color
|
||||
TERM rxvt-unicode256
|
||||
TERM screen-256color
|
||||
TERM xterm-256color
|
||||
TERM gnome-256color
|
||||
|
||||
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
|
||||
EIGHTBIT 1
|
||||
|
||||
# Below are the color init strings for the basic file types. A color init
|
||||
# string consists of one or more of the following numeric codes:
|
||||
# Attribute codes:
|
||||
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
|
||||
# Text color(8 colors mode) codes:
|
||||
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
|
||||
# Background color(8 colors mode) codes:
|
||||
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
||||
# Text color(256 colors mode) codes:
|
||||
# Valid syntax for text 256color is 38;5;<color number> , where color number
|
||||
# is number between 0 and 255.
|
||||
# You may find following command useful to search the best one for you:
|
||||
# for ((x=0; x<=255; x++));do echo -e "${x}:\033[38;5;${x}mcolor\033[000m";done
|
||||
# Background color(256 colors mode) codes:
|
||||
# Valid syntax for background 256color is 48;5;<color number> , where
|
||||
# color number is number between 0 and 255.
|
||||
# You may find following command useful to search the best one for you:
|
||||
# for ((x=0; x<=255; x++));do echo -e "${x}:\033[48;5;${x}mcolor\033[000m";done
|
||||
|
||||
#NORMAL 00 # global default, no color code at all
|
||||
#FILE 00 # normal file, use no color at all
|
||||
RESET 0 # reset to "normal" color
|
||||
DIR 38;5;27 # directory
|
||||
LINK 38;5;51 # symbolic link (If you set this to 'target' instead of a
|
||||
# numerical value, the color is as for the file pointed to.)
|
||||
MULTIHARDLINK 44;38;5;15 # regular file with more than one link
|
||||
FIFO 40;38;5;11 # pipe
|
||||
SOCK 38;5;13 # socket
|
||||
DOOR 38;5;5 # door
|
||||
BLK 48;5;232;38;5;11 # block device driver
|
||||
CHR 48;5;232;38;5;3 # character device driver
|
||||
ORPHAN 48;5;232;38;5;9 # symlink to nonexistent file, or non-stat'able file
|
||||
MISSING 05;48;5;232;38;5;15 # ... and the files they point to
|
||||
SETUID 48;5;196;38;5;15 # file that is setuid (u+s)
|
||||
SETGID 48;5;11;38;5;16 # file that is setgid (g+s)
|
||||
CAPABILITY 48;5;196;38;5;226 # file with capability
|
||||
STICKY_OTHER_WRITABLE 48;5;10;38;5;16 # dir that is sticky and other-writable (+t,o+w)
|
||||
OTHER_WRITABLE 48;5;10;38;5;21 # dir that is other-writable (o+w) and not sticky
|
||||
STICKY 48;5;21;38;5;15 # dir with the sticky bit set (+t) and not other-writable
|
||||
|
||||
# This is for files with execute permission:
|
||||
EXEC 38;5;34
|
||||
|
||||
# List any file extensions like '.gz' or '.tar' that you would like ls
|
||||
# to colorize below. Put the extension, a space, and the color init string.
|
||||
# (and any comments you want to add after a '#')
|
||||
# executables (bright green)
|
||||
#.cmd 38;5;34
|
||||
#.exe 38;5;34
|
||||
#.com 38;5;34
|
||||
#.btm 38;5;34
|
||||
#.bat 38;5;34
|
||||
#.sh 38;5;34
|
||||
#.csh 38;5;34
|
||||
# archives or compressed (bright red)
|
||||
.tar 38;5;9
|
||||
.tgz 38;5;9
|
||||
.arj 38;5;9
|
||||
.taz 38;5;9
|
||||
.lzh 38;5;9
|
||||
.lzma 38;5;9
|
||||
.tlz 38;5;9
|
||||
.txz 38;5;9
|
||||
.zip 38;5;9
|
||||
.z 38;5;9
|
||||
.Z 38;5;9
|
||||
.dz 38;5;9
|
||||
.gz 38;5;9
|
||||
.lz 38;5;9
|
||||
.xz 38;5;9
|
||||
.bz2 38;5;9
|
||||
.tbz 38;5;9
|
||||
.tbz2 38;5;9
|
||||
.bz 38;5;9
|
||||
.tz 38;5;9
|
||||
.deb 38;5;9
|
||||
.rpm 38;5;9
|
||||
.jar 38;5;9
|
||||
.rar 38;5;9
|
||||
.ace 38;5;9
|
||||
.zoo 38;5;9
|
||||
.cpio 38;5;9
|
||||
.7z 38;5;9
|
||||
.rz 38;5;9
|
||||
|
||||
# image formats (magenta)
|
||||
.jpg 38;5;13
|
||||
.jpeg 38;5;13
|
||||
.gif 38;5;13
|
||||
.bmp 38;5;13
|
||||
.pbm 38;5;13
|
||||
.pgm 38;5;13
|
||||
.ppm 38;5;13
|
||||
.tga 38;5;13
|
||||
.xbm 38;5;13
|
||||
.xpm 38;5;13
|
||||
.tif 38;5;13
|
||||
.tiff 38;5;13
|
||||
.png 38;5;13
|
||||
.svg 38;5;13
|
||||
.svgz 38;5;13
|
||||
.mng 38;5;13
|
||||
.pcx 38;5;13
|
||||
.mov 38;5;13
|
||||
.mpg 38;5;13
|
||||
.mpeg 38;5;13
|
||||
.m2v 38;5;13
|
||||
.mkv 38;5;13
|
||||
.ogm 38;5;13
|
||||
.mp4 38;5;13
|
||||
.m4v 38;5;13
|
||||
.mp4v 38;5;13
|
||||
.vob 38;5;13
|
||||
.qt 38;5;13
|
||||
.nuv 38;5;13
|
||||
.wmv 38;5;13
|
||||
.asf 38;5;13
|
||||
.rm 38;5;13
|
||||
.rmvb 38;5;13
|
||||
.flc 38;5;13
|
||||
.avi 38;5;13
|
||||
.fli 38;5;13
|
||||
.flv 38;5;13
|
||||
.gl 38;5;13
|
||||
.dl 38;5;13
|
||||
.xcf 38;5;13
|
||||
.xwd 38;5;13
|
||||
.yuv 38;5;13
|
||||
.cgm 38;5;13
|
||||
.emf 38;5;13
|
||||
|
||||
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
|
||||
.axv 38;5;13
|
||||
.anx 38;5;13
|
||||
.ogv 38;5;13
|
||||
.ogx 38;5;13
|
||||
|
||||
# audio formats (cyan)
|
||||
.aac 38;5;45
|
||||
.au 38;5;45
|
||||
.flac 38;5;45
|
||||
.mid 38;5;45
|
||||
.midi 38;5;45
|
||||
.mka 38;5;45
|
||||
.mp3 38;5;45
|
||||
.mpc 38;5;45
|
||||
.ogg 38;5;45
|
||||
.ra 38;5;45
|
||||
.wav 38;5;45
|
||||
|
||||
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
|
||||
.axa 38;5;45
|
||||
.oga 38;5;45
|
||||
.spx 38;5;45
|
||||
.xspf 38;5;45
|
||||
191
coreutils-DIR_COLORS.lightbgcolor
Normal file
191
coreutils-DIR_COLORS.lightbgcolor
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
# Configuration file for the color ls utility - modified for gray backgrounds
|
||||
# Synchronized with coreutils 8.5 dircolors
|
||||
# This file goes in the /etc directory, and must be world readable.
|
||||
# You can copy this file to .dir_colors in your $HOME directory to override
|
||||
# the system defaults.
|
||||
|
||||
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
|
||||
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
|
||||
# off.
|
||||
COLOR tty
|
||||
|
||||
# Extra command line options for ls go here.
|
||||
# Basically these ones are:
|
||||
# -F = show '/' for dirs, '*' for executables, etc.
|
||||
# -T 0 = don't trust tab spacing when formatting ls output.
|
||||
OPTIONS -F -T 0
|
||||
|
||||
# Below, there should be one TERM entry for each termtype that is colorizable
|
||||
TERM linux
|
||||
TERM console
|
||||
TERM con132x25
|
||||
TERM con132x30
|
||||
TERM con132x43
|
||||
TERM con132x60
|
||||
TERM con80x25
|
||||
TERM con80x28
|
||||
TERM con80x30
|
||||
TERM con80x43
|
||||
TERM con80x50
|
||||
TERM con80x60
|
||||
TERM cons25
|
||||
TERM xterm
|
||||
TERM xterm-16color
|
||||
TERM xterm-88color
|
||||
TERM xterm-256color
|
||||
TERM rxvt
|
||||
TERM rxvt-256color
|
||||
TERM rxvt-unicode
|
||||
TERM rxvt-unicode256
|
||||
TERM xterm-color
|
||||
TERM color-xterm
|
||||
TERM vt100
|
||||
TERM dtterm
|
||||
TERM color_xterm
|
||||
|
||||
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
|
||||
EIGHTBIT 1
|
||||
|
||||
# Below are the color init strings for the basic file types. A color init
|
||||
# string consists of one or more of the following numeric codes:
|
||||
# Attribute codes:
|
||||
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
|
||||
# Text color codes:
|
||||
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
|
||||
# Background color codes:
|
||||
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
||||
#NORMAL 00 # no color code at all
|
||||
#FILE 00 # normal file, use no color at all
|
||||
RESET 0
|
||||
DIR 00;34 # directory
|
||||
LINK 00;36 # symbolic link (If you set this to 'target' instead of a
|
||||
# numerical value, the color is as for the file pointed to.)
|
||||
MULTIHARDLINK 00 # regular file with more than one link
|
||||
FIFO 40;33 # pipe
|
||||
SOCK 00;35 # socket
|
||||
DOOR 00;35 # door
|
||||
BLK 40;33;01 # block device driver
|
||||
CHR 40;33;01 # character device driver
|
||||
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file
|
||||
MISSING 01;05;37;41 # ... and the files they point to
|
||||
SETUID 37;41 # file that is setuid (u+s)
|
||||
SETGID 30;43 # file that is setgid (g+s)
|
||||
CAPABILITY 30;41 # file with capability
|
||||
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
|
||||
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
|
||||
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
|
||||
|
||||
|
||||
# This is for files with execute permission:
|
||||
EXEC 00;32
|
||||
|
||||
# List any file extensions like '.gz' or '.tar' that you would like ls
|
||||
# to colorize below. Put the extension, a space, and the color init string.
|
||||
# (and any comments you want to add after a '#')
|
||||
#.cmd 00;32 # executables (green)
|
||||
#.exe 00;32
|
||||
#.com 00;32
|
||||
#.btm 00;32
|
||||
#.bat 00;32
|
||||
#.sh 00;32
|
||||
#.csh 00;32
|
||||
# archives or compressed (red)
|
||||
.tar 00;31
|
||||
.tgz 00;31
|
||||
.arj 00;31
|
||||
.taz 00;31
|
||||
.lzh 00;31
|
||||
.lzma 00;31
|
||||
.tlz 00;31
|
||||
.txz 00;31
|
||||
.zip 00;31
|
||||
.z 00;31
|
||||
.Z 00;31
|
||||
.dz 00;31
|
||||
.gz 00;31
|
||||
.lz 00;31
|
||||
.xz 00;31
|
||||
.bz2 00;31
|
||||
.tbz 00;31
|
||||
.tbz2 00;31
|
||||
.bz 00;31
|
||||
.tz 00;31
|
||||
.deb 00;31
|
||||
.rpm 00;31
|
||||
.jar 00;31
|
||||
.rar 00;31
|
||||
.ace 00;31
|
||||
.zoo 00;31
|
||||
.cpio 00;31
|
||||
.7z 00;31
|
||||
.rz 00;31
|
||||
# image formats (magenta)
|
||||
.jpg 00;35
|
||||
.jpeg 00;35
|
||||
.gif 00;35
|
||||
.bmp 00;35
|
||||
.pbm 00;35
|
||||
.pgm 00;35
|
||||
.ppm 00;35
|
||||
.tga 00;35
|
||||
.xbm 00;35
|
||||
.xpm 00;35
|
||||
.tif 00;35
|
||||
.tiff 00;35
|
||||
.png 00;35
|
||||
.svg 00;35
|
||||
.svgz 00;35
|
||||
.mng 00;35
|
||||
.pcx 00;35
|
||||
.mov 00;35
|
||||
.mpg 00;35
|
||||
.mpeg 00;35
|
||||
.m2v 00;35
|
||||
.mkv 00;35
|
||||
.ogm 00;35
|
||||
.mp4 00;35
|
||||
.m4v 00;35
|
||||
.mp4v 00;35
|
||||
.vob 00;35
|
||||
.qt 00;35
|
||||
.nuv 00;35
|
||||
.wmv 00;35
|
||||
.asf 00;35
|
||||
.rm 00;35
|
||||
.rmvb 00;35
|
||||
.flc 00;35
|
||||
.avi 00;35
|
||||
.fli 00;35
|
||||
.flv 00;35
|
||||
.gl 00;35
|
||||
.dl 00;35
|
||||
.xcf 00;35
|
||||
.xwd 00;35
|
||||
.yuv 00;35
|
||||
.cgm 00;35
|
||||
.emf 00;35
|
||||
|
||||
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
|
||||
.axv 00;35
|
||||
.anx 00;35
|
||||
.ogv 00;35
|
||||
.ogx 00;35
|
||||
|
||||
# audio formats (cyan)
|
||||
.aac 00;36
|
||||
.au 00;36
|
||||
.flac 00;36
|
||||
.mid 00;36
|
||||
.midi 00;36
|
||||
.mka 00;36
|
||||
.mp3 00;36
|
||||
.mpc 00;36
|
||||
.ogg 00;36
|
||||
.ra 00;36
|
||||
.wav 00;36
|
||||
|
||||
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
|
||||
.axa 00;36
|
||||
.oga 00;36
|
||||
.spx 00;36
|
||||
.xspf 00;36
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
# skip everything for non-interactive shells
|
||||
if (! $?prompt) exit
|
||||
|
||||
#! /bin/csh -f
|
||||
# color-ls initialization
|
||||
if ( $?USER_LS_COLORS ) then
|
||||
if ( "$USER_LS_COLORS" != "" ) then
|
||||
|
|
@ -13,49 +11,34 @@ endif
|
|||
alias ll 'ls -l'
|
||||
alias l. 'ls -d .*'
|
||||
set COLORS=/etc/DIR_COLORS
|
||||
|
||||
if ($?TERM) then
|
||||
if ( -e "/etc/DIR_COLORS.$TERM" ) then
|
||||
set COLORS="/etc/DIR_COLORS.$TERM"
|
||||
endif
|
||||
endif
|
||||
if ( -e "/etc/DIR_COLORS.256color" ) then
|
||||
if ( "`tty -s && tput colors`" == "256" ) then
|
||||
set COLORS=/etc/DIR_COLORS.256color
|
||||
endif
|
||||
endif
|
||||
if ( -f ~/.dircolors ) set COLORS=~/.dircolors
|
||||
if ( -f ~/.dir_colors ) set COLORS=~/.dir_colors
|
||||
if ($?TERM) then
|
||||
if ( -f ~/.dircolors."$TERM" ) set COLORS=~/.dircolors."$TERM"
|
||||
if ( -f ~/.dir_colors."$TERM" ) set COLORS=~/.dir_colors."$TERM"
|
||||
endif
|
||||
set INCLUDE="`/usr/bin/cat "$COLORS" | /usr/bin/grep '^INCLUDE' | /usr/bin/cut -d ' ' -f2-`"
|
||||
|
||||
if ( ! -e "$COLORS" ) exit
|
||||
|
||||
set _tmp="`/usr/bin/mktemp .colorlsXXX -q --tmpdir=/tmp`"
|
||||
#if mktemp fails, exit when include was active, otherwise use $COLORS file
|
||||
if ( "$_tmp" == '' ) then
|
||||
if ( "$INCLUDE" == '' ) then
|
||||
eval "`/usr/bin/dircolors -c $COLORS`"
|
||||
endif
|
||||
goto cleanup
|
||||
endif
|
||||
|
||||
if ( "$INCLUDE" != '' ) /usr/bin/cat "$INCLUDE" >> $_tmp
|
||||
/usr/bin/grep -v '^INCLUDE' "$COLORS" >> $_tmp
|
||||
|
||||
eval "`/usr/bin/dircolors -c $_tmp`"
|
||||
|
||||
/usr/bin/rm -f $_tmp
|
||||
eval "`dircolors -c $COLORS`"
|
||||
|
||||
if ( "$LS_COLORS" == '' ) exit
|
||||
cleanup:
|
||||
set color_none=`/usr/bin/sed -n '/^COLOR.*none/Ip' < $COLORS`
|
||||
set color_none=`sed -n '/^COLOR.*none/Ip' < $COLORS`
|
||||
if ( "$color_none" != '' ) then
|
||||
unset color_none
|
||||
exit
|
||||
endif
|
||||
unset color_none
|
||||
unset _tmp
|
||||
unset INCLUDE
|
||||
unset COLORS
|
||||
|
||||
finish:
|
||||
alias ll 'ls -l --color=auto'
|
||||
|
|
|
|||
|
|
@ -1,53 +1,40 @@
|
|||
# color-ls initialization
|
||||
|
||||
# Skip all for noninteractive shells.
|
||||
[ ! -t 0 ] && return
|
||||
|
||||
#when USER_LS_COLORS defined do not override user LS_COLORS, but use them.
|
||||
if [ -z "$USER_LS_COLORS" ]; then
|
||||
|
||||
alias ll='ls -l' 2>/dev/null
|
||||
alias l.='ls -d .*' 2>/dev/null
|
||||
|
||||
INCLUDE=
|
||||
|
||||
# Skip the rest for noninteractive shells.
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
COLORS=
|
||||
|
||||
for colors in "$HOME/.dir_colors.$TERM" "$HOME/.dircolors.$TERM" \
|
||||
"$HOME/.dir_colors" "$HOME/.dircolors"; do
|
||||
[ -e "$colors" ] && COLORS="$colors" && \
|
||||
INCLUDE="`/usr/bin/cat "$COLORS" | /usr/bin/grep '^INCLUDE' | /usr/bin/cut -d ' ' -f2-`" && \
|
||||
break
|
||||
[ -e "$colors" ] && COLORS="$colors" && break
|
||||
done
|
||||
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.$TERM" ] && \
|
||||
COLORS="/etc/DIR_COLORS.$TERM"
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.256color" ] && \
|
||||
[ "x`tty -s && tput colors 2>/dev/null`" = "x256" ] && \
|
||||
COLORS="/etc/DIR_COLORS.256color"
|
||||
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS" ] && \
|
||||
COLORS="/etc/DIR_COLORS"
|
||||
if [ -z "$COLORS" ]; then
|
||||
for colors in "/etc/DIR_COLORS.$TERM" "/etc/DIR_COLORS" ; do
|
||||
[ -e "$colors" ] && COLORS="$colors" && break
|
||||
done
|
||||
fi
|
||||
|
||||
# Existence of $COLORS already checked above.
|
||||
[ -n "$COLORS" ] || return
|
||||
|
||||
if [ -e "$INCLUDE" ];
|
||||
then
|
||||
TMP="`/usr/bin/mktemp .colorlsXXX -q --tmpdir=/tmp`"
|
||||
[ -z "$TMP" ] && return
|
||||
|
||||
/usr/bin/cat "$INCLUDE" >> $TMP
|
||||
/usr/bin/grep -v '^INCLUDE' "$COLORS" >> $TMP
|
||||
|
||||
eval "`/usr/bin/dircolors --sh $TMP 2>/dev/null`"
|
||||
/usr/bin/rm -f $TMP
|
||||
else
|
||||
eval "`/usr/bin/dircolors --sh $COLORS 2>/dev/null`"
|
||||
fi
|
||||
|
||||
eval "`dircolors --sh "$COLORS" 2>/dev/null`"
|
||||
[ -z "$LS_COLORS" ] && return
|
||||
/usr/bin/grep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return
|
||||
grep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return
|
||||
fi
|
||||
|
||||
unset TMP COLORS INCLUDE
|
||||
|
||||
alias ll='ls -l --color=auto' 2>/dev/null
|
||||
alias l.='ls -d .* --color=auto' 2>/dev/null
|
||||
alias ls='ls --color=auto' 2>/dev/null
|
||||
|
|
|
|||
163
coreutils-cpxattrreadonly.patch
Normal file
163
coreutils-cpxattrreadonly.patch
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
From cca83fafa69eb26db458714830b77498b88af8a4 Mon Sep 17 00:00:00 2001
|
||||
From: Ondřej Vašík <ovasik@redhat.com>
|
||||
Date: Mon, 14 Sep 2009 13:12:01 +0000
|
||||
Subject: cp,mv: preserve extended attributes even for read-only files
|
||||
|
||||
* src/copy.c (copy_reg): Temporarily set u+rw on the destination file
|
||||
to allow GNU/Linux to set xattrs.
|
||||
* tests/misc/xattr: Test that change.
|
||||
Reported by Ernest N. Mamikonyan.
|
||||
---
|
||||
diff --git a/src/copy.c b/src/copy.c
|
||||
index f3ff5a2..ad2060b 100644
|
||||
--- a/src/copy.c
|
||||
+++ b/src/copy.c
|
||||
@@ -834,6 +834,24 @@ copy_reg (char const *src_name, char const *dst_name,
|
||||
}
|
||||
}
|
||||
|
||||
+ /* To allow copying xattrs on read-only files, temporarily chmod u+rw.
|
||||
+ This workaround is required as an inode permission check is done
|
||||
+ by xattr_permission() in fs/xattr.c of the GNU/Linux kernel tree. */
|
||||
+ if (x->preserve_xattr)
|
||||
+ {
|
||||
+ bool access_changed = false;
|
||||
+
|
||||
+ if (!(sb.st_mode & S_IWUSR) && geteuid() != 0)
|
||||
+ access_changed = fchmod_or_lchmod (dest_desc, dst_name, 0600) == 0;
|
||||
+
|
||||
+ if (!copy_attr_by_fd (src_name, source_desc, dst_name, dest_desc, x)
|
||||
+ && x->require_preserve_xattr)
|
||||
+ return_val = false;
|
||||
+
|
||||
+ if (access_changed)
|
||||
+ fchmod_or_lchmod (dest_desc, dst_name, dst_mode & ~omitted_permissions);
|
||||
+ }
|
||||
+
|
||||
if (x->preserve_ownership && ! SAME_OWNER_AND_GROUP (*src_sb, sb))
|
||||
{
|
||||
switch (set_owner (x, dst_name, dest_desc, src_sb, *new_dst, &sb))
|
||||
@@ -850,11 +868,6 @@ copy_reg (char const *src_name, char const *dst_name,
|
||||
|
||||
set_author (dst_name, dest_desc, src_sb);
|
||||
|
||||
- if (x->preserve_xattr && ! copy_attr_by_fd (src_name, source_desc,
|
||||
- dst_name, dest_desc, x)
|
||||
- && x->require_preserve_xattr)
|
||||
- return_val = false;
|
||||
-
|
||||
if (x->preserve_mode || x->move_mode)
|
||||
{
|
||||
if (copy_acl (src_name, source_desc, dst_name, dest_desc, src_mode) != 0
|
||||
diff --git a/tests/misc/xattr b/tests/misc/xattr
|
||||
index a27e1f6..fcf7ceb 100755
|
||||
--- a/tests/misc/xattr
|
||||
+++ b/tests/misc/xattr
|
||||
@@ -29,7 +29,7 @@ fi
|
||||
|
||||
# Skip this test if cp was built without xattr support:
|
||||
touch src dest || framework_failure
|
||||
-cp --preserve=xattr -n src dest 2>/dev/null \
|
||||
+cp --preserve=xattr -n src dest \
|
||||
|| skip_test_ "coreutils built without xattr support"
|
||||
|
||||
# this code was taken from test mv/backup-is-src
|
||||
@@ -46,13 +46,13 @@ xattr_pair="$xattr_name=\"$xattr_value\""
|
||||
# create new file and check its xattrs
|
||||
touch a || framework_failure
|
||||
getfattr -d a >out_a || skip_test_ "failed to get xattr of file"
|
||||
-grep -F "$xattr_pair" out_a >/dev/null && framework_failure
|
||||
+grep -F "$xattr_pair" out_a && framework_failure
|
||||
|
||||
# try to set user xattr on file
|
||||
setfattr -n "$xattr_name" -v "$xattr_value" a >out_a \
|
||||
|| skip_test_ "failed to set xattr of file"
|
||||
getfattr -d a >out_a || skip_test_ "failed to get xattr of file"
|
||||
-grep -F "$xattr_pair" out_a >/dev/null \
|
||||
+grep -F "$xattr_pair" out_a \
|
||||
|| skip_test_ "failed to set xattr of file"
|
||||
|
||||
fail=0
|
||||
@@ -60,36 +60,50 @@ fail=0
|
||||
# cp should not preserve xattr by default
|
||||
cp a b || fail=1
|
||||
getfattr -d b >out_b || skip_test_ "failed to get xattr of file"
|
||||
-grep -F "$xattr_pair" out_b >/dev/null && fail=1
|
||||
+grep -F "$xattr_pair" out_b && fail=1
|
||||
|
||||
# test if --preserve=xattr option works
|
||||
cp --preserve=xattr a b || fail=1
|
||||
getfattr -d b >out_b || skip_test_ "failed to get xattr of file"
|
||||
-grep -F "$xattr_pair" out_b >/dev/null || fail=1
|
||||
+grep -F "$xattr_pair" out_b || fail=1
|
||||
|
||||
#test if --preserve=all option works
|
||||
cp --preserve=all a c || fail=1
|
||||
getfattr -d c >out_c || skip_test_ "failed to get xattr of file"
|
||||
-grep -F "$xattr_pair" out_c >/dev/null || fail=1
|
||||
+grep -F "$xattr_pair" out_c || fail=1
|
||||
|
||||
#test if -a option works without any diagnostics
|
||||
cp -a a d 2>err && test -s err && fail=1
|
||||
getfattr -d d >out_d || skip_test_ "failed to get xattr of file"
|
||||
-grep -F "$xattr_pair" out_d >/dev/null || fail=1
|
||||
+grep -F "$xattr_pair" out_d || fail=1
|
||||
+
|
||||
+#test if --preserve=xattr works even for files without write access
|
||||
+chmod a-w a || framework_failure
|
||||
+rm -f e
|
||||
+cp --preserve=xattr a e || fail=1
|
||||
+getfattr -d e >out_e || skip_test_ "failed to get xattr of file"
|
||||
+grep -F "$xattr_pair" out_e || fail=1
|
||||
+
|
||||
+#Ensure that permission bits are preserved, too.
|
||||
+src_perm=$(stat --format=%a a)
|
||||
+dst_perm=$(stat --format=%a e)
|
||||
+test "$dst_perm" = "$src_perm" || fail=1
|
||||
+
|
||||
+chmod u+w a || framework_failure
|
||||
|
||||
rm b || framework_failure
|
||||
|
||||
# install should never preserve xattr
|
||||
ginstall a b || fail=1
|
||||
getfattr -d b >out_b || skip_test_ "failed to get xattr of file"
|
||||
-grep -F "$xattr_pair" out_b >/dev/null && fail=1
|
||||
+grep -F "$xattr_pair" out_b && fail=1
|
||||
|
||||
# mv should preserve xattr when renaming within a file system.
|
||||
# This is implicitly done by rename () and doesn't need explicit
|
||||
# xattr support in mv.
|
||||
mv a b || fail=1
|
||||
getfattr -d b >out_b || skip_test_ "failed to get xattr of file"
|
||||
-grep -F "$xattr_pair" out_b >/dev/null || cat >&2 <<EOF
|
||||
+grep -F "$xattr_pair" out_b || cat >&2 <<EOF
|
||||
=================================================================
|
||||
$0: WARNING!!!
|
||||
rename () does not preserve extended attributes
|
||||
@@ -99,18 +113,18 @@ EOF
|
||||
# try to set user xattr on file on other partition
|
||||
test_mv=1
|
||||
touch "$b_other" || framework_failure
|
||||
-setfattr -n "$xattr_name" -v "$xattr_value" "$b_other" >out_a 2>/dev/null \
|
||||
+setfattr -n "$xattr_name" -v "$xattr_value" "$b_other" >out_a \
|
||||
|| test_mv=0
|
||||
-getfattr -d "$b_other" >out_b 2>/dev/null || test_mv=0
|
||||
-grep -F "$xattr_pair" out_b >/dev/null || test_mv=0
|
||||
+getfattr -d "$b_other" >out_b || test_mv=0
|
||||
+grep -F "$xattr_pair" out_b || test_mv=0
|
||||
rm -f "$b_other" || framework_failure
|
||||
|
||||
if test $test_mv -eq 1; then
|
||||
# mv should preserve xattr when copying content from one partition to another
|
||||
mv b "$b_other" || fail=1
|
||||
- getfattr -d "$b_other" >out_b 2>/dev/null ||
|
||||
+ getfattr -d "$b_other" >out_b ||
|
||||
skip_test_ "failed to get xattr of file"
|
||||
- grep -F "$xattr_pair" out_b >/dev/null || fail=1
|
||||
+ grep -F "$xattr_pair" out_b || fail=1
|
||||
else
|
||||
cat >&2 <<EOF
|
||||
=================================================================
|
||||
--
|
||||
cgit v0.8.2.1
|
||||
|
|
@ -1,187 +0,0 @@
|
|||
From 91be1a584108a6a3d96f64382bbf206c4213b3db Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Mon, 29 Mar 2010 17:20:34 +0000
|
||||
Subject: [PATCH] coreutils-df-direct.patch
|
||||
|
||||
---
|
||||
doc/coreutils.texi | 7 ++++++
|
||||
src/df.c | 34 ++++++++++++++++++++++++++--
|
||||
tests/df/direct.sh | 55 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 94 insertions(+), 2 deletions(-)
|
||||
create mode 100755 tests/df/direct.sh
|
||||
|
||||
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
|
||||
index b420606..0ccb368 100644
|
||||
--- a/doc/coreutils.texi
|
||||
+++ b/doc/coreutils.texi
|
||||
@@ -12597,6 +12597,13 @@ some systems (notably Solaris), doing this yields more up to date results,
|
||||
but in general this option makes @command{df} much slower, especially when
|
||||
there are many or very busy file systems.
|
||||
|
||||
+@item --direct
|
||||
+@opindex --direct
|
||||
+@cindex direct statfs for a file
|
||||
+Do not resolve mount point and show statistics directly for a file. It can be
|
||||
+especially useful for NFS mount points if there is a boundary between two
|
||||
+storage policies behind the mount point.
|
||||
+
|
||||
@item --total
|
||||
@opindex --total
|
||||
@cindex grand total of file system size, usage and available space
|
||||
diff --git a/src/df.c b/src/df.c
|
||||
index 75e638c..ef9f0a7 100644
|
||||
--- a/src/df.c
|
||||
+++ b/src/df.c
|
||||
@@ -121,6 +121,9 @@ static bool print_type;
|
||||
/* If true, print a grand total at the end. */
|
||||
static bool print_grand_total;
|
||||
|
||||
+/* If true, show statistics for a file instead of mount point. */
|
||||
+static bool direct_statfs;
|
||||
+
|
||||
/* Grand total data. */
|
||||
static struct fs_usage grand_fsu;
|
||||
|
||||
@@ -248,13 +251,15 @@ enum
|
||||
NO_SYNC_OPTION = CHAR_MAX + 1,
|
||||
SYNC_OPTION,
|
||||
TOTAL_OPTION,
|
||||
- OUTPUT_OPTION
|
||||
+ OUTPUT_OPTION,
|
||||
+ DIRECT_OPTION
|
||||
};
|
||||
|
||||
static struct option const long_options[] =
|
||||
{
|
||||
{"all", no_argument, nullptr, 'a'},
|
||||
{"block-size", required_argument, nullptr, 'B'},
|
||||
+ {"direct", no_argument, nullptr, DIRECT_OPTION},
|
||||
{"inodes", no_argument, nullptr, 'i'},
|
||||
{"human-readable", no_argument, nullptr, 'h'},
|
||||
{"si", no_argument, nullptr, 'H'},
|
||||
@@ -571,7 +576,10 @@ get_header (void)
|
||||
for (idx_t col = 0; col < ncolumns; col++)
|
||||
{
|
||||
char *cell;
|
||||
- char const *header = _(columns[col]->caption);
|
||||
+ char const *header = (columns[col]->field == TARGET_FIELD
|
||||
+ && direct_statfs)?
|
||||
+ _("File") :
|
||||
+ _(columns[col]->caption);
|
||||
|
||||
if (columns[col]->field == SIZE_FIELD
|
||||
&& (header_mode == DEFAULT_MODE
|
||||
@@ -1446,6 +1454,17 @@ get_point (char const *point, const struct stat *statp)
|
||||
static void
|
||||
get_entry (char const *name, struct stat const *statp)
|
||||
{
|
||||
+ if (direct_statfs)
|
||||
+ {
|
||||
+ char *resolved = canonicalize_file_name (name);
|
||||
+ if (resolved)
|
||||
+ {
|
||||
+ get_dev (NULL, resolved, name, NULL, NULL, false, false, NULL, false);
|
||||
+ free (resolved);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if ((S_ISBLK (statp->st_mode) || S_ISCHR (statp->st_mode))
|
||||
&& get_device (name))
|
||||
return;
|
||||
@@ -1516,6 +1535,7 @@ or all file systems by default.\n\
|
||||
-B, --block-size=SIZE scale sizes by SIZE before printing them; e.g.,\n\
|
||||
'-BM' prints sizes in units of 1,048,576 bytes;\n\
|
||||
see SIZE format below\n\
|
||||
+ --direct show statistics for a file instead of mount point\n\
|
||||
-h, --human-readable print sizes in powers of 1024 (e.g., 1023M)\n\
|
||||
-H, --si print sizes in powers of 1000 (e.g., 1.1G)\n\
|
||||
"), stdout);
|
||||
@@ -1610,6 +1630,9 @@ main (int argc, char **argv)
|
||||
xstrtol_fatal (e, oi, c, long_options, optarg);
|
||||
}
|
||||
break;
|
||||
+ case DIRECT_OPTION:
|
||||
+ direct_statfs = true;
|
||||
+ break;
|
||||
case 'i':
|
||||
if (header_mode == OUTPUT_MODE)
|
||||
{
|
||||
@@ -1706,6 +1729,13 @@ main (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
+ if (direct_statfs && show_local_fs)
|
||||
+ {
|
||||
+ error (0, 0, _("options --direct and --local (-l) are mutually "
|
||||
+ "exclusive"));
|
||||
+ usage (EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
if (human_output_opts == -1)
|
||||
{
|
||||
if (posix_format)
|
||||
diff --git a/tests/df/direct.sh b/tests/df/direct.sh
|
||||
new file mode 100755
|
||||
index 0000000..8e4cfb8
|
||||
--- /dev/null
|
||||
+++ b/tests/df/direct.sh
|
||||
@@ -0,0 +1,55 @@
|
||||
+#!/bin/sh
|
||||
+# Ensure "df --direct" works as documented
|
||||
+
|
||||
+# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
+
|
||||
+# This program is free software: you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU General Public License as published by
|
||||
+# the Free Software Foundation, either version 3 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+
|
||||
+# This program is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+# GNU General Public License for more details.
|
||||
+
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
+print_ver_ df
|
||||
+
|
||||
+df || skip_ "df fails"
|
||||
+
|
||||
+DIR=`pwd` || framework_failure
|
||||
+FILE="$DIR/file"
|
||||
+touch "$FILE" || framework_failure
|
||||
+echo "$FILE" > file_exp || framework_failure
|
||||
+echo "Mounted on" > header_mounted_exp || framework_failure
|
||||
+echo "File" > header_file_exp || framework_failure
|
||||
+
|
||||
+fail=0
|
||||
+
|
||||
+df --portability "$FILE" > df_out || fail=1
|
||||
+df --portability --direct "$FILE" > df_direct_out || fail=1
|
||||
+df --portability --direct --local "$FILE" > /dev/null 2>&1 && fail=1
|
||||
+
|
||||
+# check df header
|
||||
+$AWK '{ if (NR==1) print $6 " " $7; }' df_out > header_mounted_out \
|
||||
+ || framework_failure
|
||||
+$AWK '{ if (NR==1) print $6; }' df_direct_out > header_file_out \
|
||||
+ || framework_failure
|
||||
+compare header_mounted_out header_mounted_exp || fail=1
|
||||
+compare header_file_out header_file_exp || fail=1
|
||||
+
|
||||
+# check df output (without --direct)
|
||||
+$AWK '{ if (NR==2) print $6; }' df_out > file_out \
|
||||
+ || framework_failure
|
||||
+compare file_out file_exp && fail=1
|
||||
+
|
||||
+# check df output (with --direct)
|
||||
+$AWK '{ if (NR==2) print $6; }' df_direct_out > file_out \
|
||||
+ || framework_failure
|
||||
+compare file_out file_exp || fail=1
|
||||
+
|
||||
+Exit $fail
|
||||
--
|
||||
2.52.0
|
||||
|
||||
23
coreutils-getfacl-exit-code.patch
Normal file
23
coreutils-getfacl-exit-code.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
--- coreutils-6.8+/tests/cp/acl.getfacl-exit-code 2007-03-01 16:48:29.000000000 +0000
|
||||
+++ coreutils-6.8+/tests/cp/acl 2007-03-01 16:49:35.000000000 +0000
|
||||
@@ -70,16 +70,16 @@
|
||||
# copy a file without preserving permissions
|
||||
cp a/file b/ || fail=1
|
||||
|
||||
-acl2=`cd b && getfacl file` || framework_failure
|
||||
+acl2=`cd b && getfacl file`
|
||||
test "$acl1" = "$acl2" || fail=1
|
||||
rm a/file || framework_failure
|
||||
|
||||
# copy a file, preserving permissions
|
||||
touch a/file || framework_failure
|
||||
-setfacl -m user:bin:rw a/file || framework_failure
|
||||
-acl1=`cd a && getfacl file` || framework_failure
|
||||
+setfacl -m user:bin:rw a/file
|
||||
+acl1=`cd a && getfacl file`
|
||||
cp -p a/file b/ || fail=1
|
||||
-acl2=`cd b && getfacl file` || framework_failure
|
||||
+acl2=`cd b && getfacl file`
|
||||
test "$acl1" = "$acl2" || fail=1
|
||||
|
||||
Exit $fail
|
||||
29
coreutils-getgrouplist.patch
Normal file
29
coreutils-getgrouplist.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
diff -urp coreutils-6.10-orig/lib/getugroups.c coreutils-6.10/lib/getugroups.c
|
||||
--- coreutils-6.10-orig/lib/getugroups.c 2007-10-17 15:47:25.000000000 +0200
|
||||
+++ coreutils-6.10/lib/getugroups.c 2008-01-24 16:37:04.000000000 +0100
|
||||
@@ -19,6 +19,9 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
+/* We do not need this code if getgrouplist(3) is available. */
|
||||
+#ifndef HAVE_GETGROUPLIST
|
||||
+
|
||||
#include "getugroups.h"
|
||||
|
||||
#include <limits.h>
|
||||
@@ -114,3 +117,4 @@ getugroups (int maxcount, GETGROUPS_T *g
|
||||
|
||||
return count;
|
||||
}
|
||||
+#endif /* have getgrouplist */
|
||||
diff -urp coreutils-6.10-orig/m4/jm-macros.m4 coreutils-6.10/m4/jm-macros.m4
|
||||
--- coreutils-6.10-orig/m4/jm-macros.m4 2007-11-25 14:23:31.000000000 +0100
|
||||
+++ coreutils-6.10/m4/jm-macros.m4 2008-01-24 16:42:00.000000000 +0100
|
||||
@@ -52,6 +52,7 @@ AC_DEFUN([coreutils_MACROS],
|
||||
fchown \
|
||||
fchmod \
|
||||
ftruncate \
|
||||
+ getgrouplist \
|
||||
iswspace \
|
||||
mkfifo \
|
||||
mbrlen \
|
||||
6575
coreutils-i18n.patch
6575
coreutils-i18n.patch
File diff suppressed because it is too large
Load diff
|
|
@ -1,312 +0,0 @@
|
|||
Release GPG keyring of coreutils group.
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBE58fE4BEADGS6VzDkx2OO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EcbLYUJwoEYlFpcnNWNYBwjLqAWXuMA+mE2fX/+NoMY1/c
|
||||
rOZ46y3dLq0zJfD+LBgORx10j1fFaAj9j36pg43DUewZSwLtBhlYJ/SExW0Rz0xU
|
||||
MU+C/4EJjy7+3ycLV+M8gnJGVwp2+z1H1ESe5bH6hSgARqQ4pOfP9sbM7sNX/y17
|
||||
KMEAEQEAAYkCHwQYAQIACQUCTnx8TgIbDAAKCRDfb9lxMGA32aBIEADAGhbCehSj
|
||||
Wv8SEw9gUpN+slmIDBnZ7uqQgXjWO5OnG2TrSJyPNAwfk6ESY6JeoGuiASL3EpqD
|
||||
vRTVsIvDzzqhNBwVa+mi/q3lof9yNs74dmJYsH0P20+9lVzNfWATWUDA4cVYBvON
|
||||
BloCK1cVvn9zqFvfjFBcRbZskcvMBVPxO2Fv4xAzX+omPDfCnweY8G7i71Z8Nnl/
|
||||
HVkSZMI9uXrtcde00oISHf5xUebJdx96dxnUCDLPUwPiIxxYN44KvIl3cnIB5qwu
|
||||
BV8F2XXUtBdxZDJexqsCIoAD3rhRoWq6E2fRJKeqt/4TmxwjsJ8ZODp+ilXhqRe/
|
||||
shHttoOvbo5QBZNZMujxkqxXeu+j2E3Ry5mSiGX1SewwbT1iUppwGI15Uwhthhrc
|
||||
PwbtWxxIyzPBU6awwlrTrYxNTB1n7WM99gcQctLWZpWnEaoAnEmIEcPjnM+c2NRw
|
||||
UJmE/C5h9intY4fOa2a8hpUPx6UbMkfPl0bkIA2cduvQtAFKy/G/Jm4H+0trSmrD
|
||||
c+o+rl7v9sMJ9wKkMUdAcqUgNP0TEHzDPbzvztcKBCLnNLoUTKNIN4eNJjMGk8Si
|
||||
/OgiN1NKkuVz7I3i916mVxxlFjKEyLYU4tYYXsbB+ZJy4dTP/YWHbQulJYLgju6Z
|
||||
ELphkzjc6eM3CaOZ73u4GVXotheeUabUHQ==
|
||||
=drvb
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
9
coreutils-mkstemp.patch
Normal file
9
coreutils-mkstemp.patch
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
--- coreutils-7.6/lib/mkstemp.c.BAD 2010-03-03 18:17:52.000000000 +0000
|
||||
+++ coreutils-7.6/lib/mkstemp.c 2010-03-03 18:18:28.000000000 +0000
|
||||
@@ -40,5 +40,5 @@
|
||||
mkstemp (template)
|
||||
char *template;
|
||||
{
|
||||
- return __gen_tempname (template, 0, __GT_FILE);
|
||||
+ return __gen_tempname (template, __GT_FILE);
|
||||
}
|
||||
11
coreutils-overflow.patch
Normal file
11
coreutils-overflow.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- coreutils-5.2.1/src/who.c.overflow 2005-05-25 09:59:06.000000000 +0100
|
||||
+++ coreutils-5.2.1/src/who.c 2005-05-25 10:00:31.000000000 +0100
|
||||
@@ -75,7 +75,7 @@
|
||||
# define UT_TYPE_NEW_TIME(U) false
|
||||
#endif
|
||||
|
||||
-#define IDLESTR_LEN 6
|
||||
+#define IDLESTR_LEN 10
|
||||
|
||||
#if HAVE_STRUCT_XTMP_UT_PID
|
||||
# define PIDSTR_DECL_AND_INIT(Var, Utmp_ent) \
|
||||
423
coreutils-pam.patch
Normal file
423
coreutils-pam.patch
Normal file
|
|
@ -0,0 +1,423 @@
|
|||
--- coreutils-6.7/src/Makefile.am.pam 2006-11-24 21:28:10.000000000 +0000
|
||||
+++ coreutils-6.7/src/Makefile.am 2007-01-09 17:00:01.000000000 +0000
|
||||
@@ -103,7 +103,7 @@
|
||||
# If necessary, add -lm to resolve use of pow in lib/strtod.c.
|
||||
uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS)
|
||||
|
||||
-su_LDADD = $(LDADD) $(LIB_CRYPT)
|
||||
+su_LDADD = $(LDADD) $(LIB_CRYPT) @LIB_PAM@
|
||||
|
||||
dir_LDADD += $(LIB_ACL)
|
||||
ls_LDADD += $(LIB_ACL)
|
||||
--- coreutils-6.7/src/su.c.pam 2007-01-09 17:00:01.000000000 +0000
|
||||
+++ coreutils-6.7/src/su.c 2007-01-09 17:16:43.000000000 +0000
|
||||
@@ -38,6 +38,16 @@
|
||||
restricts who can su to UID 0 accounts. RMS considers that to
|
||||
be fascist.
|
||||
|
||||
+#ifdef USE_PAM
|
||||
+
|
||||
+ Actually, with PAM, su has nothing to do with whether or not a
|
||||
+ wheel group is enforced by su. RMS tries to restrict your access
|
||||
+ to a su which implements the wheel group, but PAM considers that
|
||||
+ to be fascist, and gives the user/sysadmin the opportunity to
|
||||
+ enforce a wheel group by proper editing of /etc/pam.conf
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
Compile-time options:
|
||||
-DSYSLOG_SUCCESS Log successful su's (by default, to root) with syslog.
|
||||
-DSYSLOG_FAILURE Log failed su's (by default, to root) with syslog.
|
||||
@@ -59,6 +69,15 @@
|
||||
prototype (returning `int') in <unistd.h>. */
|
||||
#define getusershell _getusershell_sys_proto_
|
||||
|
||||
+#ifdef USE_PAM
|
||||
+# include <signal.h>
|
||||
+# include <sys/wait.h>
|
||||
+# include <sys/fsuid.h>
|
||||
+# include <unistd.h>
|
||||
+# include <security/pam_appl.h>
|
||||
+# include <security/pam_misc.h>
|
||||
+#endif /* USE_PAM */
|
||||
+
|
||||
#include "system.h"
|
||||
#include "getpass.h"
|
||||
|
||||
@@ -128,15 +147,22 @@
|
||||
/* The user to become if none is specified. */
|
||||
#define DEFAULT_USER "root"
|
||||
|
||||
+#ifndef USE_PAM
|
||||
char *crypt (char const *key, char const *salt);
|
||||
+#endif
|
||||
char *getusershell (void);
|
||||
void endusershell (void);
|
||||
void setusershell (void);
|
||||
|
||||
extern char **environ;
|
||||
|
||||
-static void run_shell (char const *, char const *, char **, size_t)
|
||||
+static void run_shell (char const *, char const *, char **, size_t,
|
||||
+ const struct passwd *)
|
||||
+#ifdef USE_PAM
|
||||
+ ;
|
||||
+#else
|
||||
ATTRIBUTE_NORETURN;
|
||||
+#endif
|
||||
|
||||
/* If true, pass the `-f' option to the subshell. */
|
||||
static bool fast_startup;
|
||||
@@ -225,7 +251,26 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef USE_PAM
|
||||
+static pam_handle_t *pamh = NULL;
|
||||
+static int retval;
|
||||
+static struct pam_conv conv = {
|
||||
+ misc_conv,
|
||||
+ NULL
|
||||
+};
|
||||
+
|
||||
+#define PAM_BAIL_P if (retval) { \
|
||||
+ pam_end(pamh, PAM_SUCCESS); \
|
||||
+ return 0; \
|
||||
+}
|
||||
+#define PAM_BAIL_P_VOID if (retval) { \
|
||||
+ pam_end(pamh, PAM_SUCCESS); \
|
||||
+return; \
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/* Ask the user for a password.
|
||||
+ If PAM is in use, let PAM ask for the password if necessary.
|
||||
Return true if the user gives the correct password for entry PW,
|
||||
false if not. Return true without asking for a password if run by UID 0
|
||||
or if PW has an empty password. */
|
||||
@@ -233,6 +278,44 @@
|
||||
static bool
|
||||
correct_password (const struct passwd *pw)
|
||||
{
|
||||
+#ifdef USE_PAM
|
||||
+ struct passwd *caller;
|
||||
+ char *tty_name, *ttyn;
|
||||
+ retval = pam_start(PROGRAM_NAME, pw->pw_name, &conv, &pamh);
|
||||
+ PAM_BAIL_P;
|
||||
+
|
||||
+ if (getuid() != 0 && !isatty(0)) {
|
||||
+ fprintf(stderr, "standard in must be a tty\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+ caller = getpwuid(getuid());
|
||||
+ if(caller != NULL && caller->pw_name != NULL) {
|
||||
+ retval = pam_set_item(pamh, PAM_RUSER, caller->pw_name);
|
||||
+ PAM_BAIL_P;
|
||||
+ }
|
||||
+
|
||||
+ ttyn = ttyname(0);
|
||||
+ if (ttyn) {
|
||||
+ if (strncmp(ttyn, "/dev/", 5) == 0)
|
||||
+ tty_name = ttyn+5;
|
||||
+ else
|
||||
+ tty_name = ttyn;
|
||||
+ retval = pam_set_item(pamh, PAM_TTY, tty_name);
|
||||
+ PAM_BAIL_P;
|
||||
+ }
|
||||
+ retval = pam_authenticate(pamh, 0);
|
||||
+ PAM_BAIL_P;
|
||||
+ retval = pam_acct_mgmt(pamh, 0);
|
||||
+ if (retval == PAM_NEW_AUTHTOK_REQD) {
|
||||
+ /* password has expired. Offer option to change it. */
|
||||
+ retval = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
|
||||
+ PAM_BAIL_P;
|
||||
+ }
|
||||
+ PAM_BAIL_P;
|
||||
+ /* must be authenticated if this point was reached */
|
||||
+ return 1;
|
||||
+#else /* !USE_PAM */
|
||||
char *unencrypted, *encrypted, *correct;
|
||||
#if HAVE_GETSPNAM && HAVE_STRUCT_SPWD_SP_PWDP
|
||||
/* Shadow passwd stuff for SVR3 and maybe other systems. */
|
||||
@@ -257,6 +340,7 @@
|
||||
encrypted = crypt (unencrypted, correct);
|
||||
memset (unencrypted, 0, strlen (unencrypted));
|
||||
return STREQ (encrypted, correct);
|
||||
+#endif /* !USE_PAM */
|
||||
}
|
||||
|
||||
/* Update `environ' for the new shell based on PW, with SHELL being
|
||||
@@ -270,12 +354,18 @@
|
||||
/* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH.
|
||||
Unset all other environment variables. */
|
||||
char const *term = getenv ("TERM");
|
||||
+ char const *display = getenv ("DISPLAY");
|
||||
+ char const *xauthority = getenv ("XAUTHORITY");
|
||||
if (term)
|
||||
term = xstrdup (term);
|
||||
environ = xmalloc ((6 + !!term) * sizeof (char *));
|
||||
environ[0] = NULL;
|
||||
if (term)
|
||||
xsetenv ("TERM", term);
|
||||
+ if (display)
|
||||
+ xsetenv ("DISPLAY", display);
|
||||
+ if (xauthority)
|
||||
+ xsetenv ("XAUTHORITY", xauthority);
|
||||
xsetenv ("HOME", pw->pw_dir);
|
||||
xsetenv ("SHELL", shell);
|
||||
xsetenv ("USER", pw->pw_name);
|
||||
@@ -308,8 +398,13 @@
|
||||
{
|
||||
#ifdef HAVE_INITGROUPS
|
||||
errno = 0;
|
||||
- if (initgroups (pw->pw_name, pw->pw_gid) == -1)
|
||||
+ if (initgroups (pw->pw_name, pw->pw_gid) == -1) {
|
||||
+#ifdef USE_PAM
|
||||
+ pam_close_session(pamh, 0);
|
||||
+ pam_end(pamh, PAM_ABORT);
|
||||
+#endif
|
||||
error (EXIT_FAILURE, errno, _("cannot set groups"));
|
||||
+ }
|
||||
endgrent ();
|
||||
#endif
|
||||
if (setgid (pw->pw_gid))
|
||||
@@ -318,6 +413,31 @@
|
||||
error (EXIT_FAILURE, errno, _("cannot set user id"));
|
||||
}
|
||||
|
||||
+#ifdef USE_PAM
|
||||
+static int caught=0;
|
||||
+/* Signal handler for parent process later */
|
||||
+static void su_catch_sig(int sig)
|
||||
+{
|
||||
+ ++caught;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+pam_copyenv (pam_handle_t *pamh)
|
||||
+{
|
||||
+ char **env;
|
||||
+
|
||||
+ env = pam_getenvlist(pamh);
|
||||
+ if(env) {
|
||||
+ while(*env) {
|
||||
+ if (putenv (*env))
|
||||
+ xalloc_die ();
|
||||
+ env++;
|
||||
+ }
|
||||
+ }
|
||||
+ return(0);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/* Run SHELL, or DEFAULT_SHELL if SHELL is empty.
|
||||
If COMMAND is nonzero, pass it to the shell with the -c option.
|
||||
Pass ADDITIONAL_ARGS to the shell as more arguments; there
|
||||
@@ -325,17 +445,49 @@
|
||||
|
||||
static void
|
||||
run_shell (char const *shell, char const *command, char **additional_args,
|
||||
- size_t n_additional_args)
|
||||
+ size_t n_additional_args, const struct passwd *pw)
|
||||
{
|
||||
size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1;
|
||||
char const **args = xnmalloc (n_args, sizeof *args);
|
||||
size_t argno = 1;
|
||||
+#ifdef USE_PAM
|
||||
+ int child;
|
||||
+ sigset_t ourset;
|
||||
+ int status;
|
||||
+
|
||||
+ retval = pam_open_session(pamh,0);
|
||||
+ if (retval != PAM_SUCCESS) {
|
||||
+ fprintf (stderr, "could not open session\n");
|
||||
+ exit (1);
|
||||
+ }
|
||||
+
|
||||
+/* do this at the last possible moment, because environment variables may
|
||||
+ be passed even in the session phase
|
||||
+*/
|
||||
+ if(pam_copyenv(pamh) != PAM_SUCCESS)
|
||||
+ fprintf (stderr, "error copying PAM environment\n");
|
||||
+
|
||||
+ /* Credentials should be set in the parent */
|
||||
+ if (pam_setcred(pamh, PAM_ESTABLISH_CRED) != PAM_SUCCESS) {
|
||||
+ pam_close_session(pamh, 0);
|
||||
+ fprintf(stderr, "could not set PAM credentials\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+ child = fork();
|
||||
+ if (child == 0) { /* child shell */
|
||||
+ change_identity (pw);
|
||||
+ pam_end(pamh, 0);
|
||||
+#endif
|
||||
|
||||
if (simulate_login)
|
||||
{
|
||||
char *arg0;
|
||||
char *shell_basename;
|
||||
|
||||
+ if(chdir(pw->pw_dir))
|
||||
+ error(0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
|
||||
+
|
||||
shell_basename = last_component (shell);
|
||||
arg0 = xmalloc (strlen (shell_basename) + 2);
|
||||
arg0[0] = '-';
|
||||
@@ -360,6 +512,67 @@
|
||||
error (0, errno, "%s", shell);
|
||||
exit (exit_status);
|
||||
}
|
||||
+#ifdef USE_PAM
|
||||
+ } else if (child == -1) {
|
||||
+ fprintf(stderr, "can not fork user shell: %s", strerror(errno));
|
||||
+ pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT);
|
||||
+ pam_close_session(pamh, 0);
|
||||
+ pam_end(pamh, PAM_ABORT);
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ /* parent only */
|
||||
+ sigfillset(&ourset);
|
||||
+ if (sigprocmask(SIG_BLOCK, &ourset, NULL)) {
|
||||
+ fprintf(stderr, "%s: signal malfunction\n", PROGRAM_NAME);
|
||||
+ caught = 1;
|
||||
+ }
|
||||
+ if (!caught) {
|
||||
+ struct sigaction action;
|
||||
+ action.sa_handler = su_catch_sig;
|
||||
+ sigemptyset(&action.sa_mask);
|
||||
+ action.sa_flags = 0;
|
||||
+ sigemptyset(&ourset);
|
||||
+ if (sigaddset(&ourset, SIGTERM)
|
||||
+ || sigaddset(&ourset, SIGALRM)
|
||||
+ || sigaction(SIGTERM, &action, NULL)
|
||||
+ || sigprocmask(SIG_UNBLOCK, &ourset, NULL)) {
|
||||
+ fprintf(stderr, "%s: signal masking malfunction\n", PROGRAM_NAME);
|
||||
+ caught = 1;
|
||||
+ }
|
||||
+ }
|
||||
+ if (!caught) {
|
||||
+ do {
|
||||
+ int pid;
|
||||
+
|
||||
+ pid = waitpid(-1, &status, WUNTRACED);
|
||||
+
|
||||
+ if (((pid_t)-1 != pid) && (0 != WIFSTOPPED (status))) {
|
||||
+ kill(getpid(), WSTOPSIG(status));
|
||||
+ /* once we get here, we must have resumed */
|
||||
+ kill(pid, SIGCONT);
|
||||
+ }
|
||||
+ } while (0 != WIFSTOPPED(status));
|
||||
+ }
|
||||
+
|
||||
+ if (caught) {
|
||||
+ fprintf(stderr, "\nSession terminated, killing shell...");
|
||||
+ kill (child, SIGTERM);
|
||||
+ }
|
||||
+ /* Not checking retval on this because we need to call close session */
|
||||
+ pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT);
|
||||
+ retval = pam_close_session(pamh, 0);
|
||||
+ PAM_BAIL_P_VOID;
|
||||
+ retval = pam_end(pamh, PAM_SUCCESS);
|
||||
+ PAM_BAIL_P_VOID;
|
||||
+ if (caught) {
|
||||
+ sleep(2);
|
||||
+ kill(child, SIGKILL);
|
||||
+ fprintf(stderr, " ...killed.\n");
|
||||
+ exit(-1);
|
||||
+ }
|
||||
+ exit ((0 != WIFEXITED (status)) ? WEXITSTATUS (status)
|
||||
+ : WTERMSIG (status) + 128);
|
||||
+#endif /* USE_PAM */
|
||||
}
|
||||
|
||||
/* Return true if SHELL is a restricted shell (one not returned by
|
||||
@@ -527,9 +739,9 @@
|
||||
shell = xstrdup (shell ? shell : pw->pw_shell);
|
||||
modify_environment (pw, shell);
|
||||
|
||||
+#ifndef USE_PAM
|
||||
change_identity (pw);
|
||||
- if (simulate_login && chdir (pw->pw_dir) != 0)
|
||||
- error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
|
||||
+#endif
|
||||
|
||||
- run_shell (shell, command, argv + optind, MAX (0, argc - optind));
|
||||
+ run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw);
|
||||
}
|
||||
--- coreutils-6.7/doc/coreutils.texi.pam 2006-10-27 15:30:48.000000000 +0100
|
||||
+++ coreutils-6.7/doc/coreutils.texi 2007-01-09 17:00:01.000000000 +0000
|
||||
@@ -13395,8 +13395,11 @@
|
||||
@findex syslog
|
||||
@command{su} can optionally be compiled to use @code{syslog} to report
|
||||
failed, and optionally successful, @command{su} attempts. (If the system
|
||||
-supports @code{syslog}.) However, GNU @command{su} does not check if the
|
||||
-user is a member of the @code{wheel} group; see below.
|
||||
+supports @code{syslog}.)
|
||||
+
|
||||
+This version of @command{su} has support for using PAM for
|
||||
+authentication. You can edit @file{/etc/pam.d/su} to customize its
|
||||
+behaviour.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@@ -12815,6 +12815,8 @@
|
||||
@env{PATH} to a compiled-in default value. Change to @var{user}'s home
|
||||
directory. Prepend @samp{-} to the shell's name, intended to make it
|
||||
read its login startup file(s).
|
||||
+Additionaly @env{DISPLAY} and @env{XAUTHORITY} environment variables
|
||||
+are preserved as well for PAM functionality.
|
||||
|
||||
@item -m
|
||||
@itemx -p
|
||||
@@ -13477,33 +13480,6 @@
|
||||
the exit status of the subshell otherwise
|
||||
@end display
|
||||
|
||||
-@cindex wheel group, not supported
|
||||
-@cindex group wheel, not supported
|
||||
-@cindex fascism
|
||||
-@subsection Why GNU @command{su} does not support the @samp{wheel} group
|
||||
-
|
||||
-(This section is by Richard Stallman.)
|
||||
-
|
||||
-@cindex Twenex
|
||||
-@cindex MIT AI lab
|
||||
-Sometimes a few of the users try to hold total power over all the
|
||||
-rest. For example, in 1984, a few users at the MIT AI lab decided to
|
||||
-seize power by changing the operator password on the Twenex system and
|
||||
-keeping it secret from everyone else. (I was able to thwart this coup
|
||||
-and give power back to the users by patching the kernel, but I
|
||||
-wouldn't know how to do that in Unix.)
|
||||
-
|
||||
-However, occasionally the rulers do tell someone. Under the usual
|
||||
-@command{su} mechanism, once someone learns the root password who
|
||||
-sympathizes with the ordinary users, he or she can tell the rest. The
|
||||
-``wheel group'' feature would make this impossible, and thus cement the
|
||||
-power of the rulers.
|
||||
-
|
||||
-I'm on the side of the masses, not that of the rulers. If you are
|
||||
-used to supporting the bosses and sysadmins in whatever they do, you
|
||||
-might find this idea strange at first.
|
||||
-
|
||||
-
|
||||
@node timeout invocation
|
||||
@section @command{timeout}: Run a command with a time limit
|
||||
|
||||
--- coreutils-7.1/configure.ac.pam
|
||||
+++ coreutils-7.1/configure.ac
|
||||
@@ -44,6 +44,13 @@
|
||||
AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
|
||||
fi
|
||||
|
||||
+dnl Give the chance to enable PAM
|
||||
+AC_ARG_ENABLE(pam, dnl
|
||||
+[ --enable-pam Enable use of the PAM libraries],
|
||||
+[AC_DEFINE(USE_PAM, 1, [Define if you want to use PAM])
|
||||
+LIB_PAM="-ldl -lpam -lpam_misc"
|
||||
+AC_SUBST(LIB_PAM)])
|
||||
+
|
||||
AC_FUNC_FORK
|
||||
|
||||
optional_bin_progs=
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
From 8927d505ecb5334f09c48ef98ef1f464f581d0f7 Mon Sep 17 00:00:00 2001
|
||||
From: rpm-build <rpm-build>
|
||||
Date: Tue, 2 Apr 2024 14:11:26 +0100
|
||||
Subject: [PATCH] coreutils-python3.patch
|
||||
|
||||
---
|
||||
init.cfg | 4 ++--
|
||||
tests/d_type-check | 2 +-
|
||||
tests/du/move-dir-while-traversing.sh | 6 +++---
|
||||
3 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/init.cfg b/init.cfg
|
||||
index ac05f7b..26d9516 100644
|
||||
--- a/init.cfg
|
||||
+++ b/init.cfg
|
||||
@@ -601,10 +601,10 @@ seek_data_capable_()
|
||||
# Skip the current test if "." lacks d_type support.
|
||||
require_dirent_d_type_()
|
||||
{
|
||||
- python < /dev/null \
|
||||
+ python3 < /dev/null \
|
||||
|| skip_ python missing: assuming no d_type support
|
||||
|
||||
- python "$abs_srcdir"/tests/d_type-check \
|
||||
+ python3 "$abs_srcdir"/tests/d_type-check \
|
||||
|| skip_ requires d_type support
|
||||
}
|
||||
|
||||
diff --git a/tests/d_type-check b/tests/d_type-check
|
||||
index 1a2f76f..42d3924 100644
|
||||
--- a/tests/d_type-check
|
||||
+++ b/tests/d_type-check
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# Exit 0 if "." and "./tempfile" have useful d_type information, else 1.
|
||||
# Intended to exit 0 only on Linux/GNU systems.
|
||||
import os
|
||||
diff --git a/tests/du/move-dir-while-traversing.sh b/tests/du/move-dir-while-traversing.sh
|
||||
index adf482b..cf9214a 100755
|
||||
--- a/tests/du/move-dir-while-traversing.sh
|
||||
+++ b/tests/du/move-dir-while-traversing.sh
|
||||
@@ -21,8 +21,8 @@ print_ver_ du
|
||||
require_trap_signame_
|
||||
|
||||
# We use a python-inotify script, so...
|
||||
-python -m pyinotify -h > /dev/null \
|
||||
- || skip_ 'python inotify package not installed'
|
||||
+python3 -m pyinotify -h > /dev/null \
|
||||
+ || skip_ 'python3 inotify package not installed'
|
||||
|
||||
# Move a directory "up" while du is processing its sub-directories.
|
||||
# While du is processing a hierarchy .../B/C/D/... this script
|
||||
@@ -33,7 +33,7 @@ python -m pyinotify -h > /dev/null \
|
||||
# rename syscall before du finishes processing the subtree under D/.
|
||||
|
||||
cat <<'EOF' > inotify-watch-for-dir-access.py
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
import pyinotify as pn
|
||||
import os,sys
|
||||
|
||||
--
|
||||
2.51.0
|
||||
|
||||
4
coreutils-runuser-l.pamd
Normal file
4
coreutils-runuser-l.pamd
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#%PAM-1.0
|
||||
auth include runuser
|
||||
session optional pam_keyinit.so force revoke
|
||||
session include runuser
|
||||
5
coreutils-runuser.pamd
Normal file
5
coreutils-runuser.pamd
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#%PAM-1.0
|
||||
auth sufficient pam_rootok.so
|
||||
session optional pam_keyinit.so revoke
|
||||
session required pam_limits.so
|
||||
session required pam_unix.so
|
||||
812
coreutils-selinux.patch
Normal file
812
coreutils-selinux.patch
Normal file
|
|
@ -0,0 +1,812 @@
|
|||
diff -urNp coreutils-7.1-orig/configure.ac coreutils-7.1/configure.ac
|
||||
--- coreutils-7.1-orig/configure.ac 2009-02-24 13:47:15.000000000 +0100
|
||||
+++ coreutils-7.1/configure.ac 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -84,6 +84,13 @@ AC_ARG_ENABLE(pam, dnl
|
||||
LIB_PAM="-ldl -lpam -lpam_misc"
|
||||
AC_SUBST(LIB_PAM)])
|
||||
|
||||
+dnl Give the chance to enable SELINUX
|
||||
+AC_ARG_ENABLE(selinux, dnl
|
||||
+[ --enable-selinux Enable use of the SELINUX libraries],
|
||||
+[AC_DEFINE(WITH_SELINUX, 1, [Define if you want to use SELINUX])
|
||||
+LIB_SELINUX="-lselinux"
|
||||
+AC_SUBST(LIB_SELINUX)])
|
||||
+
|
||||
AC_FUNC_FORK
|
||||
|
||||
optional_bin_progs=
|
||||
diff -urNp coreutils-7.1-orig/man/chcon.x coreutils-7.1/man/chcon.x
|
||||
--- coreutils-7.1-orig/man/chcon.x 2008-09-18 09:06:57.000000000 +0200
|
||||
+++ coreutils-7.1/man/chcon.x 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
[NAME]
|
||||
-chcon \- change file security context
|
||||
+chcon \- change file SELinux security context
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
diff -urNp coreutils-7.1-orig/man/runcon.x coreutils-7.1/man/runcon.x
|
||||
--- coreutils-7.1-orig/man/runcon.x 2008-09-18 09:06:57.000000000 +0200
|
||||
+++ coreutils-7.1/man/runcon.x 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
[NAME]
|
||||
-runcon \- run command with specified security context
|
||||
+runcon \- run command with specified SELinux security context
|
||||
[DESCRIPTION]
|
||||
Run COMMAND with completely-specified CONTEXT, or with current or
|
||||
transitioned security context modified by one or more of LEVEL,
|
||||
diff -urNp coreutils-7.1-orig/src/copy.c coreutils-7.1/src/copy.c
|
||||
--- coreutils-7.1-orig/src/copy.c 2009-02-18 15:32:52.000000000 +0100
|
||||
+++ coreutils-7.1/src/copy.c 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -1830,6 +1830,8 @@ copy_internal (char const *src_name, cha
|
||||
{
|
||||
/* Here, we are crossing a file system boundary and cp's -x option
|
||||
is in effect: so don't copy the contents of this directory. */
|
||||
+ if (x->preserve_security_context)
|
||||
+ restore_default_fscreatecon_or_die ();
|
||||
}
|
||||
else
|
||||
{
|
||||
diff -urNp coreutils-7.1-orig/src/copy.h coreutils-7.1/src/copy.h
|
||||
--- coreutils-7.1-orig/src/copy.h 2009-02-18 15:32:52.000000000 +0100
|
||||
+++ coreutils-7.1/src/copy.h 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -140,6 +140,9 @@ struct cp_options
|
||||
bool preserve_mode;
|
||||
bool preserve_timestamps;
|
||||
|
||||
+ /* If true, attempt to set specified security context */
|
||||
+ bool set_security_context;
|
||||
+
|
||||
/* Enabled for mv, and for cp by the --preserve=links option.
|
||||
If true, attempt to preserve in the destination files any
|
||||
logical hard links between the source files. If used with cp's
|
||||
diff -urNp coreutils-7.1-orig/src/cp.c coreutils-7.1/src/cp.c
|
||||
--- coreutils-7.1-orig/src/cp.c 2009-02-18 15:32:52.000000000 +0100
|
||||
+++ coreutils-7.1/src/cp.c 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -133,6 +133,7 @@ static struct option const long_opts[] =
|
||||
{"target-directory", required_argument, NULL, 't'},
|
||||
{"update", no_argument, NULL, 'u'},
|
||||
{"verbose", no_argument, NULL, 'v'},
|
||||
+ {"context", required_argument, NULL, 'Z'},
|
||||
{GETOPT_HELP_OPTION_DECL},
|
||||
{GETOPT_VERSION_OPTION_DECL},
|
||||
{NULL, 0, NULL, 0}
|
||||
@@ -191,6 +192,9 @@ Mandatory arguments to long options are
|
||||
all\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
+ -c same as --preserve=context\n\
|
||||
+"), stdout);
|
||||
+ fputs (_("\
|
||||
--no-preserve=ATTR_LIST don't preserve the specified attributes\n\
|
||||
--parents use full source file name under DIRECTORY\n\
|
||||
"), stdout);
|
||||
@@ -216,6 +220,7 @@ Mandatory arguments to long options are
|
||||
destination file is missing\n\
|
||||
-v, --verbose explain what is being done\n\
|
||||
-x, --one-file-system stay on this file system\n\
|
||||
+ -Z, --context=CONTEXT set security context of copy to CONTEXT\n\
|
||||
"), stdout);
|
||||
fputs (HELP_OPTION_DESCRIPTION, stdout);
|
||||
fputs (VERSION_OPTION_DESCRIPTION, stdout);
|
||||
@@ -765,6 +770,7 @@ cp_option_init (struct cp_options *x)
|
||||
x->preserve_timestamps = false;
|
||||
x->preserve_security_context = false;
|
||||
x->require_preserve_context = false;
|
||||
+ x->set_security_context = false;
|
||||
x->preserve_xattr = false;
|
||||
x->reduce_diagnostics = false;
|
||||
x->require_preserve_xattr = false;
|
||||
@@ -911,7 +917,7 @@ main (int argc, char **argv)
|
||||
we'll actually use backup_suffix_string. */
|
||||
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
|
||||
|
||||
- while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:T",
|
||||
+ while ((c = getopt_long (argc, argv, "abcdfHilLnprst:uvxPRS:TZ:",
|
||||
long_opts, NULL))
|
||||
!= -1)
|
||||
{
|
||||
@@ -945,6 +951,16 @@ main (int argc, char **argv)
|
||||
copy_contents = true;
|
||||
break;
|
||||
|
||||
+ case 'c':
|
||||
+ if ( x.set_security_context ) {
|
||||
+ (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]);
|
||||
+ exit( 1 );
|
||||
+ }
|
||||
+ else if (selinux_enabled) {
|
||||
+ x.preserve_security_context = true;
|
||||
+ x.require_preserve_context = true;
|
||||
+ }
|
||||
+ break;
|
||||
case 'd':
|
||||
x.preserve_links = true;
|
||||
x.dereference = DEREF_NEVER;
|
||||
@@ -1054,6 +1070,27 @@ main (int argc, char **argv)
|
||||
x.one_file_system = true;
|
||||
break;
|
||||
|
||||
+
|
||||
+ case 'Z':
|
||||
+ /* politely decline if we're not on a selinux-enabled kernel. */
|
||||
+ if( !selinux_enabled ) {
|
||||
+ fprintf( stderr, "Warning: ignoring --context (-Z). "
|
||||
+ "It requires a SELinux enabled kernel.\n" );
|
||||
+ break;
|
||||
+ }
|
||||
+ if ( x.preserve_security_context ) {
|
||||
+ (void) fprintf(stderr, "%s: cannot force target context to '%s' and preserve it\n", argv[0], optarg);
|
||||
+ exit( 1 );
|
||||
+ }
|
||||
+ x.set_security_context = true;
|
||||
+ /* if there's a security_context given set new path
|
||||
+ components to that context, too */
|
||||
+ if ( setfscreatecon(optarg) < 0 ) {
|
||||
+ (void) fprintf(stderr, _("cannot set default security context %s\n"), optarg);
|
||||
+ exit( 1 );
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
case 'S':
|
||||
make_backups = true;
|
||||
backup_suffix_string = optarg;
|
||||
diff -urNp coreutils-7.1-orig/src/chcon.c coreutils-7.1/src/chcon.c
|
||||
--- coreutils-7.1-orig/src/chcon.c 2008-10-12 16:12:56.000000000 +0200
|
||||
+++ coreutils-7.1/src/chcon.c 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -346,7 +346,7 @@ Usage: %s [OPTION]... CONTEXT FILE...\n\
|
||||
"),
|
||||
program_name, program_name, program_name);
|
||||
fputs (_("\
|
||||
-Change the security context of each FILE to CONTEXT.\n\
|
||||
+Change the SELinux security context of each FILE to CONTEXT.\n\
|
||||
With --reference, change the security context of each FILE to that of RFILE.\n\
|
||||
\n\
|
||||
-h, --no-dereference affect symbolic links instead of any referenced file\n\
|
||||
diff -urNp coreutils-7.1-orig/src/id.c coreutils-7.1/src/id.c
|
||||
--- coreutils-7.1-orig/src/id.c 2009-02-16 15:57:44.000000000 +0100
|
||||
+++ coreutils-7.1/src/id.c 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -107,7 +107,7 @@ int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int optc;
|
||||
- int selinux_enabled = (is_selinux_enabled () > 0);
|
||||
+ bool selinux_enabled = (is_selinux_enabled () > 0);
|
||||
|
||||
/* If true, output the list of all group IDs. -G */
|
||||
bool just_group_list = false;
|
||||
diff -urNp coreutils-7.1-orig/src/install.c coreutils-7.1/src/install.c
|
||||
--- coreutils-7.1-orig/src/install.c 2009-02-18 15:32:52.000000000 +0100
|
||||
+++ coreutils-7.1/src/install.c 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -292,6 +292,7 @@ cp_option_init (struct cp_options *x)
|
||||
x->reduce_diagnostics=false;
|
||||
x->require_preserve = false;
|
||||
x->require_preserve_context = false;
|
||||
+ x->set_security_context = false;
|
||||
x->require_preserve_xattr = false;
|
||||
x->recursive = false;
|
||||
x->sparse_mode = SPARSE_AUTO;
|
||||
@@ -469,7 +470,7 @@ main (int argc, char **argv)
|
||||
we'll actually use backup_suffix_string. */
|
||||
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
|
||||
|
||||
- while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z:", long_options,
|
||||
+ while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pPt:TvS:Z:", long_options,
|
||||
NULL)) != -1)
|
||||
{
|
||||
switch (optc)
|
||||
@@ -539,6 +540,7 @@ main (int argc, char **argv)
|
||||
error (0, 0, _("WARNING: --preserve_context is deprecated; "
|
||||
"use --preserve-context instead"));
|
||||
/* fall through */
|
||||
+ case 'P':
|
||||
case PRESERVE_CONTEXT_OPTION:
|
||||
if ( ! selinux_enabled)
|
||||
{
|
||||
@@ -546,6 +548,10 @@ main (int argc, char **argv)
|
||||
"this kernel is not SELinux-enabled"));
|
||||
break;
|
||||
}
|
||||
+ if ( x.set_security_context ) {
|
||||
+ (void) fprintf(stderr, "%s: cannot force target context and preserve it\n", argv[0]);
|
||||
+ exit( 1 );
|
||||
+ }
|
||||
x.preserve_security_context = true;
|
||||
use_default_selinux_context = false;
|
||||
break;
|
||||
@@ -557,6 +563,7 @@ main (int argc, char **argv)
|
||||
break;
|
||||
}
|
||||
scontext = optarg;
|
||||
+ x.set_security_context = true;
|
||||
use_default_selinux_context = false;
|
||||
break;
|
||||
case_GETOPT_HELP_CHAR;
|
||||
@@ -990,8 +997,8 @@ Mandatory arguments to long options are
|
||||
-v, --verbose print the name of each directory as it is created\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
- --preserve-context preserve SELinux security context\n\
|
||||
- -Z, --context=CONTEXT set SELinux security context of files and directories\n\
|
||||
+ -P, --preserve-context (SELinux) preserve security context\n\
|
||||
+ -Z, --context=CONTEXT (SELinux) set security context of files and directories\n\
|
||||
"), stdout);
|
||||
|
||||
fputs (HELP_OPTION_DESCRIPTION, stdout);
|
||||
diff -urNp coreutils-7.1-orig/src/ls.c coreutils-7.1/src/ls.c
|
||||
--- coreutils-7.1-orig/src/ls.c 2009-02-20 19:34:02.000000000 +0100
|
||||
+++ coreutils-7.1/src/ls.c 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -136,7 +136,8 @@ enum filetype
|
||||
symbolic_link,
|
||||
sock,
|
||||
whiteout,
|
||||
- arg_directory
|
||||
+ arg_directory,
|
||||
+ command_line
|
||||
};
|
||||
|
||||
/* Display letters and indicators for each filetype.
|
||||
@@ -253,6 +254,7 @@ static void queue_directory (char const
|
||||
static void sort_files (void);
|
||||
static void parse_ls_color (void);
|
||||
void usage (int status);
|
||||
+static void print_scontext_format (const struct fileinfo *f);
|
||||
|
||||
/* Initial size of hash table.
|
||||
Most hierarchies are likely to be shallower than this. */
|
||||
@@ -322,7 +324,7 @@ static struct pending *pending_dirs;
|
||||
|
||||
static struct timespec current_time;
|
||||
|
||||
-static bool print_scontext;
|
||||
+static int print_scontext = 0;
|
||||
static char UNKNOWN_SECURITY_CONTEXT[] = "?";
|
||||
|
||||
/* Whether any of the files has an ACL. This affects the width of the
|
||||
@@ -362,7 +364,9 @@ enum format
|
||||
one_per_line, /* -1 */
|
||||
many_per_line, /* -C */
|
||||
horizontal, /* -x */
|
||||
- with_commas /* -m */
|
||||
+ with_commas, /* -m */
|
||||
+ security_format, /* -Z */
|
||||
+ invalid_format
|
||||
};
|
||||
|
||||
static enum format format;
|
||||
@@ -754,6 +758,9 @@ enum
|
||||
SHOW_CONTROL_CHARS_OPTION,
|
||||
SI_OPTION,
|
||||
SORT_OPTION,
|
||||
+ CONTEXT_OPTION,
|
||||
+ LCONTEXT_OPTION,
|
||||
+ SCONTEXT_OPTION,
|
||||
TIME_OPTION,
|
||||
TIME_STYLE_OPTION
|
||||
};
|
||||
@@ -799,7 +806,9 @@ static struct option const long_options[
|
||||
{"time-style", required_argument, NULL, TIME_STYLE_OPTION},
|
||||
{"color", optional_argument, NULL, COLOR_OPTION},
|
||||
{"block-size", required_argument, NULL, BLOCK_SIZE_OPTION},
|
||||
- {"context", no_argument, 0, 'Z'},
|
||||
+ {"context", no_argument, 0, CONTEXT_OPTION},
|
||||
+ {"lcontext", no_argument, 0, LCONTEXT_OPTION},
|
||||
+ {"scontext", no_argument, 0, SCONTEXT_OPTION},
|
||||
{"author", no_argument, NULL, AUTHOR_OPTION},
|
||||
{GETOPT_HELP_OPTION_DECL},
|
||||
{GETOPT_VERSION_OPTION_DECL},
|
||||
@@ -809,12 +818,12 @@ static struct option const long_options[
|
||||
static char const *const format_args[] =
|
||||
{
|
||||
"verbose", "long", "commas", "horizontal", "across",
|
||||
- "vertical", "single-column", NULL
|
||||
+ "vertical", "single-column", "context", NULL
|
||||
};
|
||||
static enum format const format_types[] =
|
||||
{
|
||||
long_format, long_format, with_commas, horizontal, horizontal,
|
||||
- many_per_line, one_per_line
|
||||
+ many_per_line, one_per_line, security_format
|
||||
};
|
||||
ARGMATCH_VERIFY (format_args, format_types);
|
||||
|
||||
@@ -1194,7 +1203,8 @@ main (int argc, char **argv)
|
||||
/* Avoid following symbolic links when possible. */
|
||||
if (is_colored (C_ORPHAN)
|
||||
|| (is_colored (C_EXEC) && color_symlink_as_referent)
|
||||
- || (is_colored (C_MISSING) && format == long_format))
|
||||
+ || (is_colored (C_MISSING) && (format == long_format
|
||||
+ || format == security_format)))
|
||||
check_symlink_color = true;
|
||||
|
||||
/* If the standard output is a controlling terminal, watch out
|
||||
@@ -1241,7 +1251,7 @@ main (int argc, char **argv)
|
||||
if (dereference == DEREF_UNDEFINED)
|
||||
dereference = ((immediate_dirs
|
||||
|| indicator_style == classify
|
||||
- || format == long_format)
|
||||
+ || format == long_format || format == security_format)
|
||||
? DEREF_NEVER
|
||||
: DEREF_COMMAND_LINE_SYMLINK_TO_DIR);
|
||||
|
||||
@@ -1261,7 +1271,7 @@ main (int argc, char **argv)
|
||||
|
||||
format_needs_stat = sort_type == sort_time || sort_type == sort_size
|
||||
|| format == long_format
|
||||
- || print_scontext
|
||||
+ || format == security_format || print_scontext
|
||||
|| print_block_size;
|
||||
format_needs_type = (! format_needs_stat
|
||||
&& (recursive
|
||||
@@ -1292,7 +1302,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
else
|
||||
do
|
||||
- gobble_file (argv[i++], unknown, NOT_AN_INODE_NUMBER, true, "");
|
||||
+ gobble_file (argv[i++], command_line, NOT_AN_INODE_NUMBER, true, "");
|
||||
while (i < argc);
|
||||
|
||||
if (cwd_n_used)
|
||||
@@ -1455,7 +1465,7 @@ decode_switches (int argc, char **argv)
|
||||
ignore_mode = IGNORE_DEFAULT;
|
||||
ignore_patterns = NULL;
|
||||
hide_patterns = NULL;
|
||||
- print_scontext = false;
|
||||
+ print_scontext = 0;
|
||||
|
||||
/* FIXME: put this in a function. */
|
||||
{
|
||||
@@ -1837,13 +1847,27 @@ decode_switches (int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'Z':
|
||||
- print_scontext = true;
|
||||
+ print_scontext = 1;
|
||||
+ format = security_format;
|
||||
break;
|
||||
|
||||
case_GETOPT_HELP_CHAR;
|
||||
|
||||
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
|
||||
|
||||
+ case CONTEXT_OPTION: /* default security context format */
|
||||
+ print_scontext = 1;
|
||||
+ format = security_format;
|
||||
+ break;
|
||||
+ case LCONTEXT_OPTION: /* long format plus security context */
|
||||
+ print_scontext = 1;
|
||||
+ format = long_format;
|
||||
+ break;
|
||||
+ case SCONTEXT_OPTION: /* short form of new security format */
|
||||
+ print_scontext = 0;
|
||||
+ format = security_format;
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
usage (LS_FAILURE);
|
||||
}
|
||||
@@ -2557,8 +2581,10 @@ clear_files (void)
|
||||
struct fileinfo *f = sorted_file[i];
|
||||
free (f->name);
|
||||
free (f->linkname);
|
||||
- if (f->scontext != UNKNOWN_SECURITY_CONTEXT)
|
||||
- freecon (f->scontext);
|
||||
+ if (f->scontext != UNKNOWN_SECURITY_CONTEXT) {
|
||||
+ freecon (f->scontext);
|
||||
+ f->scontext = NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
cwd_n_used = 0;
|
||||
@@ -2600,6 +2626,7 @@ gobble_file (char const *name, enum file
|
||||
memset (f, '\0', sizeof *f);
|
||||
f->stat.st_ino = inode;
|
||||
f->filetype = type;
|
||||
+ f->scontext = NULL;
|
||||
|
||||
if (command_line_arg
|
||||
|| format_needs_stat
|
||||
@@ -2699,7 +2726,7 @@ gobble_file (char const *name, enum file
|
||||
|
||||
f->stat_ok = true;
|
||||
|
||||
- if (format == long_format || print_scontext)
|
||||
+ if (format == long_format || format == security_format || print_scontext)
|
||||
{
|
||||
bool have_selinux = false;
|
||||
bool have_acl = false;
|
||||
@@ -2732,7 +2760,7 @@ gobble_file (char const *name, enum file
|
||||
err = 0;
|
||||
}
|
||||
|
||||
- if (err == 0 && format == long_format)
|
||||
+ if (err == 0 && (format == long_format || format == security_format))
|
||||
{
|
||||
int n = file_has_acl (absolute_name, &f->stat);
|
||||
err = (n < 0);
|
||||
@@ -2751,7 +2779,8 @@ gobble_file (char const *name, enum file
|
||||
}
|
||||
|
||||
if (S_ISLNK (f->stat.st_mode)
|
||||
- && (format == long_format || check_symlink_color))
|
||||
+ && (format == long_format || format == security_format
|
||||
+ || check_symlink_color))
|
||||
{
|
||||
char *linkname;
|
||||
struct stat linkstats;
|
||||
@@ -2771,6 +2800,7 @@ gobble_file (char const *name, enum file
|
||||
command line are automatically traced if not being
|
||||
listed as files. */
|
||||
if (!command_line_arg || format == long_format
|
||||
+ || format == security_format
|
||||
|| !S_ISDIR (linkstats.st_mode))
|
||||
{
|
||||
/* Get the linked-to file's mode for the filetype indicator
|
||||
@@ -2810,7 +2840,7 @@ gobble_file (char const *name, enum file
|
||||
block_size_width = len;
|
||||
}
|
||||
|
||||
- if (format == long_format)
|
||||
+ if (format == long_format || format == security_format)
|
||||
{
|
||||
if (print_owner)
|
||||
{
|
||||
@@ -3312,6 +3341,13 @@ print_current_files (void)
|
||||
print_long_format (sorted_file[i]);
|
||||
DIRED_PUTCHAR ('\n');
|
||||
}
|
||||
+ break;
|
||||
+ case security_format:
|
||||
+ for (i = 0; i < cwd_n_used; i++)
|
||||
+ {
|
||||
+ print_scontext_format (sorted_file[i]);
|
||||
+ DIRED_PUTCHAR ('\n');
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3434,6 +3470,69 @@ format_group_width (gid_t g)
|
||||
}
|
||||
|
||||
|
||||
+/* Print info about f in scontext format */
|
||||
+static void
|
||||
+print_scontext_format (const struct fileinfo *f)
|
||||
+{
|
||||
+ char modebuf[12];
|
||||
+
|
||||
+ /* 7 fields that may require LONGEST_HUMAN_READABLE bytes,
|
||||
+ 1 10-byte mode string,
|
||||
+ 9 spaces, one following each of these fields, and
|
||||
+ 1 trailing NUL byte. */
|
||||
+
|
||||
+ char init_bigbuf[7 * LONGEST_HUMAN_READABLE + 10 + 9 + 1];
|
||||
+ char *buf = init_bigbuf;
|
||||
+ char *p;
|
||||
+
|
||||
+ p = buf;
|
||||
+
|
||||
+ if ( print_scontext ) { /* zero means terse listing */
|
||||
+ filemodestring (&f->stat, modebuf);
|
||||
+ if (! any_has_acl)
|
||||
+ modebuf[10] = '\0';
|
||||
+ else if (f->acl_type == ACL_T_SELINUX_ONLY)
|
||||
+ modebuf[10] = '.';
|
||||
+ else if (f->acl_type == ACL_T_YES)
|
||||
+ modebuf[10] = '+';
|
||||
+ modebuf[11] = '\0';
|
||||
+
|
||||
+ /* print mode */
|
||||
+
|
||||
+ (void) sprintf (p, "%s ", modebuf);
|
||||
+ p += strlen (p);
|
||||
+
|
||||
+ /* print standard user and group */
|
||||
+
|
||||
+ DIRED_FPUTS (buf, stdout, p - buf);
|
||||
+ format_user (f->stat.st_uid, owner_width, f->stat_ok);
|
||||
+ format_group (f->stat.st_gid, group_width, f->stat_ok);
|
||||
+ p = buf;
|
||||
+ }
|
||||
+
|
||||
+ (void) sprintf (p, "%-32s ", f->scontext ?: "");
|
||||
+ p += strlen (p);
|
||||
+
|
||||
+ DIRED_INDENT ();
|
||||
+ DIRED_FPUTS (buf, stdout, p - buf);
|
||||
+ size_t w = print_name_with_quoting (f->name, FILE_OR_LINK_MODE(f), f->linkok,
|
||||
+ f->stat_ok, f->filetype, &dired_obstack, f->stat.st_nlink, p - buf);
|
||||
+
|
||||
+ if (f->filetype == symbolic_link) {
|
||||
+ if (f->linkname) {
|
||||
+ DIRED_FPUTS_LITERAL (" -> ", stdout);
|
||||
+ print_name_with_quoting (f->linkname, f->linkmode, f->linkok - 1,
|
||||
+ f->stat_ok, f->filetype, NULL, f->stat.st_nlink, (p-buf) + w + 4 );
|
||||
+ if (indicator_style != none)
|
||||
+ print_type_indicator (f->stat_ok, f->linkmode, f->filetype);
|
||||
+ }
|
||||
+ }
|
||||
+ else {
|
||||
+ if (indicator_style != none)
|
||||
+ print_type_indicator (f->stat_ok, f->stat.st_mode, f->filetype);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* Print information about F in long format. */
|
||||
|
||||
static void
|
||||
@@ -3528,9 +3627,15 @@ print_long_format (const struct fileinfo
|
||||
The latter is wrong when nlink_width is zero. */
|
||||
p += strlen (p);
|
||||
|
||||
+ if (print_scontext)
|
||||
+ {
|
||||
+ sprintf (p, "%-32s ", f->scontext ? f->scontext : "");
|
||||
+ p += strlen (p);
|
||||
+ }
|
||||
+
|
||||
DIRED_INDENT ();
|
||||
|
||||
- if (print_owner | print_group | print_author | print_scontext)
|
||||
+ if (print_owner | print_group | print_author)
|
||||
{
|
||||
DIRED_FPUTS (buf, stdout, p - buf);
|
||||
|
||||
@@ -3543,9 +3648,6 @@ print_long_format (const struct fileinfo
|
||||
if (print_author)
|
||||
format_user (f->stat.st_author, author_width, f->stat_ok);
|
||||
|
||||
- if (print_scontext)
|
||||
- format_user_or_group (f->scontext, 0, scontext_width);
|
||||
-
|
||||
p = buf;
|
||||
}
|
||||
|
||||
@@ -3888,9 +3990,6 @@ print_file_name_and_frills (const struct
|
||||
human_readable (ST_NBLOCKS (f->stat), buf, human_output_opts,
|
||||
ST_NBLOCKSIZE, output_block_size));
|
||||
|
||||
- if (print_scontext)
|
||||
- printf ("%*s ", format == with_commas ? 0 : scontext_width, f->scontext);
|
||||
-
|
||||
size_t width = print_name_with_quoting (f->name, FILE_OR_LINK_MODE (f),
|
||||
f->linkok, f->stat_ok, f->filetype,
|
||||
NULL, f->stat.st_nlink, start_col);
|
||||
@@ -4105,9 +4204,6 @@ length_of_file_name_and_frills (const st
|
||||
output_block_size))
|
||||
: block_size_width);
|
||||
|
||||
- if (print_scontext)
|
||||
- len += 1 + (format == with_commas ? strlen (f->scontext) : scontext_width);
|
||||
-
|
||||
quote_name (NULL, f->name, filename_quoting_options, &name_width);
|
||||
len += name_width;
|
||||
|
||||
@@ -4538,9 +4634,16 @@ Mandatory arguments to long options are
|
||||
-w, --width=COLS assume screen width instead of current value\n\
|
||||
-x list entries by lines instead of by columns\n\
|
||||
-X sort alphabetically by entry extension\n\
|
||||
- -Z, --context print any SELinux security context of each file\n\
|
||||
-1 list one file per line\n\
|
||||
"), stdout);
|
||||
+ fputs(_("\nSELinux options:\n\n\
|
||||
+ --lcontext Display security context. Enable -l. Lines\n\
|
||||
+ will probably be too wide for most displays.\n\
|
||||
+ -Z, --context Display security context so it fits on most\n\
|
||||
+ displays. Displays only mode, user, group,\n\
|
||||
+ security context and file name.\n\
|
||||
+ --scontext Display only security context and file name.\n\
|
||||
+"), stdout);
|
||||
fputs (HELP_OPTION_DESCRIPTION, stdout);
|
||||
fputs (VERSION_OPTION_DESCRIPTION, stdout);
|
||||
emit_size_note ();
|
||||
diff -urNp coreutils-7.1-orig/src/mkdir.c coreutils-7.1/src/mkdir.c
|
||||
--- coreutils-7.1-orig/src/mkdir.c 2008-10-19 21:47:57.000000000 +0200
|
||||
+++ coreutils-7.1/src/mkdir.c 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -38,6 +38,7 @@
|
||||
static struct option const longopts[] =
|
||||
{
|
||||
{GETOPT_SELINUX_CONTEXT_OPTION_DECL},
|
||||
+ {"context", required_argument, NULL, 'Z'},
|
||||
{"mode", required_argument, NULL, 'm'},
|
||||
{"parents", no_argument, NULL, 'p'},
|
||||
{"verbose", no_argument, NULL, 'v'},
|
||||
diff -urNp coreutils-7.1-orig/src/mknod.c coreutils-7.1/src/mknod.c
|
||||
--- coreutils-7.1-orig/src/mknod.c 2008-09-22 16:01:21.000000000 +0200
|
||||
+++ coreutils-7.1/src/mknod.c 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
static struct option const longopts[] =
|
||||
{
|
||||
- {GETOPT_SELINUX_CONTEXT_OPTION_DECL},
|
||||
+ {GETOPT_SELINUX_CONTEXT_OPTION_DECL},
|
||||
{"mode", required_argument, NULL, 'm'},
|
||||
{GETOPT_HELP_OPTION_DECL},
|
||||
{GETOPT_VERSION_OPTION_DECL},
|
||||
diff -urNp coreutils-7.1-orig/src/mv.c coreutils-7.1/src/mv.c
|
||||
--- coreutils-7.1-orig/src/mv.c 2009-02-18 15:32:52.000000000 +0100
|
||||
+++ coreutils-7.1/src/mv.c 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -122,6 +122,7 @@ cp_option_init (struct cp_options *x)
|
||||
x->preserve_mode = true;
|
||||
x->preserve_timestamps = true;
|
||||
x->preserve_security_context = selinux_enabled;
|
||||
+ x->set_security_context = false;
|
||||
x->reduce_diagnostics = false;
|
||||
x->require_preserve = false; /* FIXME: maybe make this an option */
|
||||
x->require_preserve_context = false;
|
||||
diff -urNp coreutils-7.1-orig/src/runcon.c coreutils-7.1/src/runcon.c
|
||||
--- coreutils-7.1-orig/src/runcon.c 2008-09-18 09:06:57.000000000 +0200
|
||||
+++ coreutils-7.1/src/runcon.c 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -86,7 +86,7 @@ Usage: %s CONTEXT COMMAND [args]\n\
|
||||
or: %s [ -c ] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n\
|
||||
"), program_name, program_name);
|
||||
fputs (_("\
|
||||
-Run a program in a different security context.\n\
|
||||
+Run a program in a different SELinux security context.\n\
|
||||
With neither CONTEXT nor COMMAND, print the current security context.\n\
|
||||
\n\
|
||||
CONTEXT Complete security context\n\
|
||||
diff -urNp coreutils-7.1-orig/src/stat.c coreutils-7.1/src/stat.c
|
||||
--- coreutils-7.1-orig/src/stat.c 2009-01-27 22:11:25.000000000 +0100
|
||||
+++ coreutils-7.1/src/stat.c 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -825,7 +825,7 @@ print_it (char const *format, char const
|
||||
|
||||
/* Stat the file system and print what we find. */
|
||||
static bool
|
||||
-do_statfs (char const *filename, bool terse, char const *format)
|
||||
+do_statfs (char const *filename, bool terse, bool secure, char const *format)
|
||||
{
|
||||
STRUCT_STATVFS statfsbuf;
|
||||
|
||||
@@ -837,15 +837,31 @@ do_statfs (char const *filename, bool te
|
||||
}
|
||||
|
||||
if (format == NULL)
|
||||
+ {
|
||||
+ if (terse)
|
||||
{
|
||||
- format = (terse
|
||||
- ? "%n %i %l %t %s %S %b %f %a %c %d\n"
|
||||
- : " File: \"%n\"\n"
|
||||
- " ID: %-8i Namelen: %-7l Type: %T\n"
|
||||
- "Block size: %-10s Fundamental block size: %S\n"
|
||||
- "Blocks: Total: %-10b Free: %-10f Available: %a\n"
|
||||
- "Inodes: Total: %-10c Free: %d\n");
|
||||
+ if (secure)
|
||||
+ format = "%n %i %l %t %s %S %b %f %a %c %d %C\n";
|
||||
+ else
|
||||
+ format = "%n %i %l %t %s %S %b %f %a %c %d\n";
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ if (secure)
|
||||
+ format = " File: \"%n\"\n"
|
||||
+ " ID: %-8i Namelen: %-7l Type: %T\n"
|
||||
+ "Block size: %-10s Fundamental block size: %S\n"
|
||||
+ "Blocks: Total: %-10b Free: %-10f Available: %a\n"
|
||||
+ "Inodes: Total: %-10c Free: %d\n"
|
||||
+ " S_Context: %C\n";
|
||||
+ else
|
||||
+ format = " File: \"%n\"\n"
|
||||
+ " ID: %-8i Namelen: %-7l Type: %T\n"
|
||||
+ "Block size: %-10s Fundamental block size: %S\n"
|
||||
+ "Blocks: Total: %-10b Free: %-10f Available: %a\n"
|
||||
+ "Inodes: Total: %-10c Free: %d\n";
|
||||
+ }
|
||||
+ }
|
||||
|
||||
print_it (format, filename, print_statfs, &statfsbuf);
|
||||
return true;
|
||||
@@ -853,7 +869,7 @@ do_statfs (char const *filename, bool te
|
||||
|
||||
/* stat the file and print what we find */
|
||||
static bool
|
||||
-do_stat (char const *filename, bool terse, char const *format)
|
||||
+do_stat (char const *filename, bool terse, bool secure, char const *format)
|
||||
{
|
||||
struct stat statbuf;
|
||||
|
||||
@@ -866,9 +882,12 @@ do_stat (char const *filename, bool ters
|
||||
if (format == NULL)
|
||||
{
|
||||
if (terse)
|
||||
- {
|
||||
- format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o\n";
|
||||
- }
|
||||
+ {
|
||||
+ if (secure)
|
||||
+ format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o %C\n";
|
||||
+ else
|
||||
+ format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o\n";
|
||||
+ }
|
||||
else
|
||||
{
|
||||
/* Temporary hack to match original output until conditional
|
||||
@@ -885,12 +904,22 @@ do_stat (char const *filename, bool ters
|
||||
}
|
||||
else
|
||||
{
|
||||
- format =
|
||||
- " File: %N\n"
|
||||
- " Size: %-10s\tBlocks: %-10b IO Block: %-6o %F\n"
|
||||
- "Device: %Dh/%dd\tInode: %-10i Links: %h\n"
|
||||
- "Access: (%04a/%10.10A) Uid: (%5u/%8U) Gid: (%5g/%8G)\n"
|
||||
- "Access: %x\n" "Modify: %y\n" "Change: %z\n";
|
||||
+ if (secure)
|
||||
+ format =
|
||||
+ " File: %N\n"
|
||||
+ " Size: %-10s\tBlocks: %-10b IO Block: %-6o %F\n"
|
||||
+ "Device: %Dh/%dd\tInode: %-10i Links: %-5h"
|
||||
+ " Device type: %t,%T\n"
|
||||
+ "Access: (%04a/%10.10A) Uid: (%5u/%8U) Gid: (%5g/%8G)\n"
|
||||
+ " S_Context: %C\n"
|
||||
+ "Access: %x\n" "Modify: %y\n" "Change: %z\n";
|
||||
+ else
|
||||
+ format =
|
||||
+ " File: %N\n"
|
||||
+ " Size: %-10s\tBlocks: %-10b IO Block: %-6o %F\n"
|
||||
+ "Device: %Dh/%dd\tInode: %-10i Links: %h\n"
|
||||
+ "Access: (%04a/%10.10A) Uid: (%5u/%8U) Gid: (%5g/%8G)\n"
|
||||
+ "Access: %x\n" "Modify: %y\n" "Change: %z\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -911,6 +940,7 @@ usage (int status)
|
||||
Display file or file system status.\n\
|
||||
\n\
|
||||
-L, --dereference follow links\n\
|
||||
+ -Z, --context print the SELinux security context \n\
|
||||
-f, --file-system display file system status instead of file status\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
@@ -995,6 +1025,7 @@ main (int argc, char *argv[])
|
||||
int i;
|
||||
bool fs = false;
|
||||
bool terse = false;
|
||||
+ bool secure = false;
|
||||
char *format = NULL;
|
||||
bool ok = true;
|
||||
|
||||
@@ -1034,13 +1065,13 @@ main (int argc, char *argv[])
|
||||
terse = true;
|
||||
break;
|
||||
|
||||
- case 'Z': /* FIXME: remove in 2010 */
|
||||
- /* Ignore, for compatibility with distributions
|
||||
- that implemented this before upstream.
|
||||
- But warn of impending removal. */
|
||||
- error (0, 0,
|
||||
- _("the --context (-Z) option is obsolete and will be removed\n"
|
||||
- "in a future release"));
|
||||
+ case 'Z':
|
||||
+ if((is_selinux_enabled()>0))
|
||||
+ secure = 1;
|
||||
+ else {
|
||||
+ error (0, 0, _("Kernel is not SELinux enabled"));
|
||||
+ usage (EXIT_FAILURE);
|
||||
+ }
|
||||
break;
|
||||
|
||||
case_GETOPT_HELP_CHAR;
|
||||
@@ -1060,8 +1091,8 @@ main (int argc, char *argv[])
|
||||
|
||||
for (i = optind; i < argc; i++)
|
||||
ok &= (fs
|
||||
- ? do_statfs (argv[i], terse, format)
|
||||
- : do_stat (argv[i], terse, format));
|
||||
+ ? do_statfs (argv[i], terse, secure, format)
|
||||
+ : do_stat (argv[i], terse, secure, format));
|
||||
|
||||
exit (ok ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
}
|
||||
diff -urNp coreutils-7.1-orig/tests/misc/selinux coreutils-7.1/tests/misc/selinux
|
||||
--- coreutils-7.1-orig/tests/misc/selinux 2008-10-25 14:20:26.000000000 +0200
|
||||
+++ coreutils-7.1/tests/misc/selinux 2009-02-24 13:47:15.000000000 +0100
|
||||
@@ -30,7 +30,7 @@ chcon $ctx f d p ||
|
||||
|
||||
# inspect that context with both ls -Z and stat.
|
||||
for i in d f p; do
|
||||
- c=`ls -dogZ $i|cut -d' ' -f3`; test x$c = x$ctx || fail=1
|
||||
+ c=`ls -dogZ $i|cut -d' ' -f5`; test x$c = x$ctx || fail=1
|
||||
c=`stat --printf %C $i`; test x$c = x$ctx || fail=1
|
||||
done
|
||||
|
||||
15
coreutils-selinuxmanpages.patch
Normal file
15
coreutils-selinuxmanpages.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
diff -urNp coreutils-6.10-orig/doc/coreutils.texi coreutils-6.10/doc/coreutils.texi
|
||||
--- coreutils-6.10-orig/doc/coreutils.texi 2008-04-07 17:52:11.000000000 +0200
|
||||
+++ coreutils-6.10/doc/coreutils.texi 2008-04-07 18:01:43.000000000 +0200
|
||||
@@ -6981,6 +6981,11 @@ for i; do
|
||||
done
|
||||
@end example
|
||||
|
||||
+@item -c
|
||||
+@cindex SELinux security context information, preserving
|
||||
+Preserve SELinux security context of the original files if possible.
|
||||
+Some file systems don't support storing of SELinux security context.
|
||||
+
|
||||
@item --copy-contents
|
||||
@cindex directories, copying recursively
|
||||
@cindex copying directories recursively
|
||||
96
coreutils-setsid.patch
Normal file
96
coreutils-setsid.patch
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
--- coreutils-6.7/src/su.c.setsid 2007-01-09 17:26:26.000000000 +0000
|
||||
+++ coreutils-6.7/src/su.c 2007-01-09 17:26:57.000000000 +0000
|
||||
@@ -176,9 +176,13 @@
|
||||
/* If true, change some environment vars to indicate the user su'd to. */
|
||||
static bool change_environment;
|
||||
|
||||
+/* If true, then don't call setsid() with a command. */
|
||||
+int same_session = 0;
|
||||
+
|
||||
static struct option const longopts[] =
|
||||
{
|
||||
{"command", required_argument, NULL, 'c'},
|
||||
+ {"session-command", required_argument, NULL, 'C'},
|
||||
{"fast", no_argument, NULL, 'f'},
|
||||
{"login", no_argument, NULL, 'l'},
|
||||
{"preserve-environment", no_argument, NULL, 'p'},
|
||||
@@ -478,6 +482,8 @@
|
||||
if (child == 0) { /* child shell */
|
||||
change_identity (pw);
|
||||
pam_end(pamh, 0);
|
||||
+ if (!same_session)
|
||||
+ setsid ();
|
||||
#endif
|
||||
|
||||
if (simulate_login)
|
||||
@@ -532,13 +538,27 @@
|
||||
sigemptyset(&action.sa_mask);
|
||||
action.sa_flags = 0;
|
||||
sigemptyset(&ourset);
|
||||
- if (sigaddset(&ourset, SIGTERM)
|
||||
- || sigaddset(&ourset, SIGALRM)
|
||||
- || sigaction(SIGTERM, &action, NULL)
|
||||
- || sigprocmask(SIG_UNBLOCK, &ourset, NULL)) {
|
||||
+ if (!same_session)
|
||||
+ {
|
||||
+ if (sigaddset(&ourset, SIGINT) || sigaddset(&ourset, SIGQUIT))
|
||||
+ {
|
||||
+ fprintf(stderr, "%s: signal masking malfunction\n", PROGRAM_NAME);
|
||||
+ caught = 1;
|
||||
+ }
|
||||
+ }
|
||||
+ if (!caught && (sigaddset(&ourset, SIGTERM)
|
||||
+ || sigaddset(&ourset, SIGALRM)
|
||||
+ || sigaction(SIGTERM, &action, NULL)
|
||||
+ || sigprocmask(SIG_UNBLOCK, &ourset, NULL))) {
|
||||
fprintf(stderr, "%s: signal masking malfunction\n", PROGRAM_NAME);
|
||||
caught = 1;
|
||||
}
|
||||
+ if (!caught && !same_session && (sigaction(SIGINT, &action, NULL)
|
||||
+ || sigaction(SIGQUIT, &action, NULL)))
|
||||
+ {
|
||||
+ fprintf(stderr, "%s: signal masking malfunction\n", PROGRAM_NAME);
|
||||
+ caught = 1;
|
||||
+ }
|
||||
}
|
||||
if (!caught) {
|
||||
do {
|
||||
@@ -609,6 +629,8 @@
|
||||
\n\
|
||||
-, -l, --login make the shell a login shell\n\
|
||||
-c, --command=COMMAND pass a single COMMAND to the shell with -c\n\
|
||||
+ --session-command=COMMAND pass a single COMMAND to the shell with -c\n\
|
||||
+ and do not create a new session\n\
|
||||
-f, --fast pass -f to the shell (for csh or tcsh)\n\
|
||||
-m, --preserve-environment do not reset environment variables\n\
|
||||
-p same as -m\n\
|
||||
@@ -631,6 +653,7 @@
|
||||
int optc;
|
||||
const char *new_user = DEFAULT_USER;
|
||||
char *command = NULL;
|
||||
+ int request_same_session = 0;
|
||||
char *shell = NULL;
|
||||
struct passwd *pw;
|
||||
struct passwd pw_copy;
|
||||
@@ -656,6 +679,11 @@
|
||||
command = optarg;
|
||||
break;
|
||||
|
||||
+ case 'C':
|
||||
+ command = optarg;
|
||||
+ request_same_session = 1;
|
||||
+ break;
|
||||
+
|
||||
case 'f':
|
||||
fast_startup = true;
|
||||
break;
|
||||
@@ -725,6 +753,9 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+ if (request_same_session || !command || !pw->pw_uid)
|
||||
+ same_session = 1;
|
||||
+
|
||||
if (!shell && !change_environment)
|
||||
shell = getenv ("SHELL");
|
||||
if (shell && getuid () != 0 && restricted_shell (pw->pw_shell))
|
||||
21
coreutils-silentmv.patch
Normal file
21
coreutils-silentmv.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff -urNp coreutils-7.2-orig/src/copy.c coreutils-7.2/src/copy.c
|
||||
--- coreutils-7.2-orig/src/copy.c 2009-04-17 15:21:26.000000000 +0200
|
||||
+++ coreutils-7.2/src/copy.c 2009-04-17 15:24:17.000000000 +0200
|
||||
@@ -139,10 +139,13 @@ copy_attr_error (struct error_context *c
|
||||
int err = errno;
|
||||
va_list ap;
|
||||
|
||||
- /* use verror module to print error message */
|
||||
- va_start (ap, fmt);
|
||||
- verror (0, err, fmt, ap);
|
||||
- va_end (ap);
|
||||
+ if (errno != ENOTSUP && errno != ENODATA)
|
||||
+ {
|
||||
+ /* use verror module to print error message */
|
||||
+ va_start (ap, fmt);
|
||||
+ verror (0, err, fmt, ap);
|
||||
+ va_end (ap);
|
||||
+ }
|
||||
}
|
||||
|
||||
static char const *
|
||||
57
coreutils-split-pam.patch
Normal file
57
coreutils-split-pam.patch
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
diff -uNrp -x '*~' coreutils-5.97-orig/src/su.c coreutils-5.97/src/su.c
|
||||
--- coreutils-5.97-orig/src/su.c 2006-07-13 12:14:40.000000000 +0100
|
||||
+++ coreutils-5.97/src/su.c 2006-07-13 12:24:33.000000000 +0100
|
||||
@@ -131,11 +131,15 @@
|
||||
|
||||
#include "error.h"
|
||||
|
||||
-/* The official name of this program (e.g., no `g' prefix). */
|
||||
+/* The official name of this program (e.g., no `g' prefix).
|
||||
+ * - Add a "-l" to the name passed to PAM if this is a login simulation
|
||||
+ */
|
||||
#ifndef RUNUSER
|
||||
#define PROGRAM_NAME "su"
|
||||
+#define PROGRAM_NAME_L "su-l"
|
||||
#else
|
||||
#define PROGRAM_NAME "runuser"
|
||||
+#define PROGRAM_NAME_L "runuser-l"
|
||||
#endif
|
||||
|
||||
#ifndef AUTHORS
|
||||
@@ -310,7 +314,8 @@ correct_password (const struct passwd *p
|
||||
#ifdef USE_PAM
|
||||
struct passwd *caller;
|
||||
char *tty_name, *ttyn;
|
||||
- retval = pam_start(PROGRAM_NAME, pw->pw_name, &conv, &pamh);
|
||||
+ retval = pam_start(simulate_login ? PROGRAM_NAME_L : PROGRAM_NAME,
|
||||
+ pw->pw_name, &conv, &pamh);
|
||||
PAM_BAIL_P;
|
||||
|
||||
#ifndef RUNUSER
|
||||
diff -urp coreutils-6.10-orig/doc/coreutils.info coreutils-6.10/doc/coreutils.info
|
||||
--- coreutils-6.10-orig/doc/coreutils.info 2008-01-22 00:32:44.000000000 +0100
|
||||
+++ coreutils-6.10/doc/coreutils.info 2008-01-24 17:17:04.000000000 +0100
|
||||
@@ -11006,7 +11006,8 @@ options::.
|
||||
set, even for the super-user, as described above), and set `PATH'
|
||||
to a compiled-in default value. Change to USER's home directory.
|
||||
Prepend `-' to the shell's name, intended to make it read its
|
||||
- login startup file(s).
|
||||
+ login startup file(s). When this option is given, /etc/pam.d/su-l
|
||||
+ PAM file is used instead of the default one.
|
||||
|
||||
`-m'
|
||||
`-p'
|
||||
diff -urp coreutils-6.10-orig/doc/coreutils.texi coreutils-6.10/doc/coreutils.texi
|
||||
--- coreutils-6.10-orig/doc/coreutils.texi 2008-01-24 16:50:57.000000000 +0100
|
||||
+++ coreutils-6.10/doc/coreutils.texi 2008-01-24 17:12:58.000000000 +0100
|
||||
@@ -13670,7 +13670,9 @@ the exit status of @var{command} otherwi
|
||||
|
||||
@command{su} allows one user to temporarily become another user. It runs a
|
||||
command (often an interactive shell) with the real and effective user
|
||||
-ID, group ID, and supplemental groups of a given @var{user}. Synopsis:
|
||||
+ID, group ID, and supplemental groups of a given @var{user}. When the -l
|
||||
+option is given, the su-l PAM file is used instead of the default su PAM file.
|
||||
+Synopsis:
|
||||
|
||||
@example
|
||||
su [@var{option}]@dots{} [@var{user} [@var{arg}]@dots{}]
|
||||
6
coreutils-su-l.pamd
Normal file
6
coreutils-su-l.pamd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#%PAM-1.0
|
||||
auth include su
|
||||
account include su
|
||||
password include su
|
||||
session optional pam_keyinit.so force revoke
|
||||
session include su
|
||||
12
coreutils-su.pamd
Normal file
12
coreutils-su.pamd
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#%PAM-1.0
|
||||
auth sufficient pam_rootok.so
|
||||
# Uncomment the following line to implicitly trust users in the "wheel" group.
|
||||
#auth sufficient pam_wheel.so trust use_uid
|
||||
# Uncomment the following line to require a user to be in the "wheel" group.
|
||||
#auth required pam_wheel.so use_uid
|
||||
auth include system-auth
|
||||
account sufficient pam_succeed_if.so uid = 0 use_uid quiet
|
||||
account include system-auth
|
||||
password include system-auth
|
||||
session include system-auth
|
||||
session optional pam_xauth.so
|
||||
1580
coreutils.spec
1580
coreutils.spec
File diff suppressed because it is too large
Load diff
18
sh-utils-1.16-paths.patch
Normal file
18
sh-utils-1.16-paths.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
--- sh-utils-1.16/src/su.c.badpaths Mon Apr 14 14:26:55 1997
|
||||
+++ sh-utils-1.16/src/su.c Sun Aug 17 14:11:31 EDT 2003
|
||||
@@ -147,6 +147,15 @@
|
||||
# define DEFAULT_ROOT_LOGIN_PATH "/usr/ucb:/bin:/usr/bin:/etc"
|
||||
#endif
|
||||
|
||||
+/* The default paths which get set are both bogus and oddly influenced
|
||||
+ by <paths.h> and -D on the commands line. Just to be clear, we'll set
|
||||
+ these explicitly. -ewt */
|
||||
+#undef DEFAULT_LOGIN_PATH
|
||||
+#undef DEFAULT_ROOT_LOGIN_PATH
|
||||
+#define DEFAULT_LOGIN_PATH "/usr/local/bin:/bin:/usr/bin"
|
||||
+#define DEFAULT_ROOT_LOGIN_PATH \
|
||||
+ "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
|
||||
+
|
||||
/* The shell to run if none is given in the user's passwd entry. */
|
||||
#define DEFAULT_SHELL "/bin/sh"
|
||||
|
||||
12
sh-utils-2.0.11-dateman.patch
Normal file
12
sh-utils-2.0.11-dateman.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -urNp coreutils-5.97-orig/man/date.x coreutils-5.97/man/date.x
|
||||
--- coreutils-5.97-orig/man/date.x 1999-11-02 15:07:36.000000000 +0100
|
||||
+++ coreutils-5.97/man/date.x 2008-10-15 10:13:31.000000000 +0200
|
||||
@@ -11,3 +11,8 @@
|
||||
relative date, and numbers. An empty string indicates the beginning
|
||||
of the day. The date string format is more complex than is easily
|
||||
documented here but is fully described in the info documentation.
|
||||
+[ENVIRONMENT]
|
||||
+.TP
|
||||
+TZ
|
||||
+Specifies the timezone, unless overridden by command line parameters.
|
||||
+If neither is specified, the setting from /etc/localtime is used.
|
||||
3
sources
3
sources
|
|
@ -1,2 +1 @@
|
|||
SHA512 (coreutils-9.9.tar.xz.sig) = 0a3dfdfa6b4234e2e1d42142269f959bdf3cf8f6605a50270a27eff84dd22588f182121f7dd3eeb04be45f5109d02690215065b3d3b43882874d0e165a1435d0
|
||||
SHA512 (coreutils-9.9.tar.xz) = e7b0e59f7732d2c098ea4934014f470248bd5c4764210e9200a698010a8e3b95bbb26e543f0cd73ed5a4b8e1f8cda932c73f39954d68175e4deaa47526610c65
|
||||
a9fb9368e40205d70fc37b9fe441e8ec coreutils-7.6.tar.xz
|
||||
|
|
|
|||
105
supported_utils
105
supported_utils
|
|
@ -1,105 +0,0 @@
|
|||
%{_bindir}/arch
|
||||
%{_bindir}/b2sum
|
||||
%{_bindir}/basename
|
||||
%{_bindir}/basenc
|
||||
%{_bindir}/cat
|
||||
%{_bindir}/chgrp
|
||||
%{_bindir}/chmod
|
||||
%{_bindir}/chown
|
||||
%{_bindir}/cp
|
||||
%{_bindir}/cut
|
||||
%{_bindir}/date
|
||||
%{_bindir}/dd
|
||||
%{_bindir}/df
|
||||
%{_bindir}/echo
|
||||
%{_bindir}/env
|
||||
%{_bindir}/false
|
||||
%{_bindir}/link
|
||||
%{_bindir}/ln
|
||||
%{_bindir}/ls
|
||||
%{_bindir}/mkdir
|
||||
%{_bindir}/mknod
|
||||
%{_bindir}/mv
|
||||
%{_bindir}/nice
|
||||
%{_bindir}/pwd
|
||||
%{_bindir}/readlink
|
||||
%{_bindir}/rm
|
||||
%{_bindir}/rmdir
|
||||
%{_bindir}/sleep
|
||||
%{_bindir}/sort
|
||||
%{_bindir}/stty
|
||||
%{_bindir}/sync
|
||||
%{_bindir}/mktemp
|
||||
%{_bindir}/touch
|
||||
%{_bindir}/true
|
||||
%{_bindir}/uname
|
||||
%{_bindir}/unlink
|
||||
%{_bindir}/[
|
||||
%{_bindir}/base32
|
||||
%{_bindir}/base64
|
||||
%{_bindir}/chcon
|
||||
%{_bindir}/cksum
|
||||
%{_bindir}/comm
|
||||
%{_bindir}/csplit
|
||||
%{_bindir}/dir
|
||||
%{_bindir}/dircolors
|
||||
%{_bindir}/dirname
|
||||
%{_bindir}/du
|
||||
%{_bindir}/expand
|
||||
%{_bindir}/expr
|
||||
%{_bindir}/factor
|
||||
%{_bindir}/fmt
|
||||
%{_bindir}/fold
|
||||
%{_bindir}/groups
|
||||
%{_bindir}/head
|
||||
%{_bindir}/hostid
|
||||
%{_bindir}/id
|
||||
%{_bindir}/install
|
||||
%{_bindir}/join
|
||||
%{_bindir}/logname
|
||||
%{_bindir}/md5sum
|
||||
%{_bindir}/mkfifo
|
||||
%{_bindir}/nl
|
||||
%{_bindir}/nohup
|
||||
%{_bindir}/nproc
|
||||
%{_bindir}/numfmt
|
||||
%{_bindir}/od
|
||||
%{_bindir}/paste
|
||||
%{_bindir}/pathchk
|
||||
%{_bindir}/pinky
|
||||
%{_bindir}/pr
|
||||
%{_bindir}/printenv
|
||||
%{_bindir}/printf
|
||||
%{_bindir}/ptx
|
||||
%{_bindir}/realpath
|
||||
%{_bindir}/runcon
|
||||
%{_bindir}/seq
|
||||
%{_bindir}/sha1sum
|
||||
%{_bindir}/sha224sum
|
||||
%{_bindir}/sha256sum
|
||||
%{_bindir}/sha384sum
|
||||
%{_bindir}/sha512sum
|
||||
%{_bindir}/shred
|
||||
%{_bindir}/shuf
|
||||
%{_bindir}/split
|
||||
%{_bindir}/stat
|
||||
%{_bindir}/stdbuf
|
||||
%{_bindir}/sum
|
||||
%{_bindir}/tac
|
||||
%{_bindir}/tail
|
||||
%{_bindir}/tee
|
||||
%{_bindir}/test
|
||||
%{_bindir}/timeout
|
||||
%{_bindir}/tr
|
||||
%{_bindir}/truncate
|
||||
%{_bindir}/tsort
|
||||
%{_bindir}/tty
|
||||
%{_bindir}/unexpand
|
||||
%{_bindir}/uniq
|
||||
%{_bindir}/users
|
||||
%{_bindir}/vdir
|
||||
%{_bindir}/wc
|
||||
%{_bindir}/who
|
||||
%{_bindir}/whoami
|
||||
%{_bindir}/yes
|
||||
%{_sbindir}/chroot
|
||||
123
upstream-key.gpg
Normal file
123
upstream-key.gpg
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.6 (GNU/Linux)
|
||||
|
||||
mQGiBDftyYoRBACvICTt5AWe7kdbRtJ37IZ+ED5tBA/IbISfqUPO+HmL/J9JSfkV
|
||||
QHbdQR5dj5mrU6BY5YOY7L4KOS6lH3AgvsZ/NhkDBraBPgnMkpDqFb7z4keCIebb
|
||||
AmlcBL2VQNTo0Lczo319YoZ+UaNH53OddlBY944qBTa0AlcJuS1SgEp7pwCg+CUj
|
||||
4SjVzqZh5lgPTS0bnYvF/n0D/iItZ7WAm37KW+9UjArWZD6NO+mVMNq4GWmhcSBD
|
||||
uyJOZFxFQWXdFRdM9sNO7lkWYVCxpXyFzmQcBzdrAt+zx/3QadEbduGAqEKAROQU
|
||||
gSDlMITWGK97/Cadn1YRSDcGKNlJX9jlJvt5Q/xh+CnJ8HTwO0PF9A5N/phFuMMB
|
||||
UH0pA/0e5eIBsr2Wvxy39+nGnNv5b+5tHkGXSSHKyI7+zOdIBTtRQO7lwTG9ioKg
|
||||
/yMqb9NCSf4GdyZiFJsQ+TWoSyk1bvFHt7YUOhTeii7Zgbk7Due2q+b9KzzyH/r2
|
||||
kf+fLh0lgiy/LfBhvsfO8M9dji3XDyZpBLRO6gda9M9NqzEfgbQfSmltIE1leWVy
|
||||
aW5nIDxqaW1AbWV5ZXJpbmcubmV0PohGBBARAgAGBQI9TvsUAAoJENoowjp5/0R0
|
||||
NTIAn2qpRF9QVupw/gz4UN5d5MKurlOMAKDNXKfXzWClHRq5ufCdwZead3WMMYhG
|
||||
BBARAgAGBQJCk1gpAAoJEIvYLm8wuUtcqlIAn0KbOC5YSkgqhfhM1uRlHnvHB74A
|
||||
AJ4qbzrkw7iitd1CH1eoMoFiP5CI14hGBBARAgAG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ql1AJsEhcfoOC2U4JjHR6rWzqinaIxcNgCg
|
||||
lmdHMQ3L8zCfNzD7lehquPy2P0eIRgQTEQIABgUCQJjhDgAKCRALtRSl0G7Wn+1r
|
||||
AJ4nUVrAEtL+XBp2UU1QmVCxa7lcSwCfT8ds7xZ++aZomPK2Xvz230WnUsGIVQQT
|
||||
EQIAFQUCN+3v9gMLCgMDFQMCAxYCAQIXgAAKCRD90t6s0zPLocAwAKCJ4wBEND4W
|
||||
mzs6Sp47mWBsp96HRACfTH+SGkDfLqgkZ7JgEgzSDKGl4TyIXQQTEQIAFQUCN+3v
|
||||
9gMLCgMDFQMCAxYCAQIXgAASCRD90t6s0zPLoQdlR1BHAAEBwDAAoInjAEQ0Phab
|
||||
OzpKnjuZYGyn3odEAJ9Mf5IaQN8uqCRnsmASDNIMoaXhPLkBDQQ37cmSEAQAx3xz
|
||||
BZlJikWJaiZGru3cEKYYnRFp8No2b4jhBwY9nKn8UIxuY5aQN4ka/k81wqjlC6cT
|
||||
wn5R7kg2ha8eGXpwYhKGwn5MGvIxqfoj2tsQ76uluTowHA4seoavi7RGEDzm4Vpt
|
||||
8Nua8krrZ2QPtLA86gkzL1QG5Bbv/o2Ldx8HHNcAAwcEAKcK2tj2X8RPgUarczXv
|
||||
rdXMteeSFnI7fagbLpEfaTI2xa1ADLg5UO4M9Erz9m6k6xV6loxcBB9H5Ljm9GWf
|
||||
el4T4p1lwzi3Lu5hKzIiFs+5vsy+fyEai4e5f6v9Ww3Q3Ec6UZpPZGyN+PDPlZxe
|
||||
rf3ZIMogSGrrEBhprhLHReudiE4EGBECAAYFAjftyZIAEgkQ/dLerNMzy6EHZUdQ
|
||||
RwABAQXiAKCilmALgD6mhccl4ISaUB5LfW74BQCgqd7wIfbV2+NKqf1Yuj75sryW
|
||||
Ke4=
|
||||
=zRdO
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
Loading…
Add table
Add a link
Reference in a new issue