Get rid off fuzz in patches
This commit is contained in:
parent
717c3451c3
commit
0e06139f50
@ -273,12 +273,12 @@
|
||||
+runuser_CFLAGS = -DRUNUSER -DAUTHORS="\"David MacKenzie, Dan Walsh\""
|
||||
+runuser_LDADD = $(LDADD) $(LIB_CRYPT) @LIB_PAM@
|
||||
+
|
||||
$(PROGRAMS): ../lib/libcoreutils.a
|
||||
stat_LDADD = $(LDADD) $(LIB_SELINUX)
|
||||
|
||||
SUFFIXES = .sh
|
||||
# Append $(LIBICONV) to each program that uses proper_name_utf8.
|
||||
@@ -126,7 +130,7 @@
|
||||
chmod +x $@-t
|
||||
mv $@-t $@
|
||||
`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
|
||||
|
@ -20,8 +20,8 @@ index 38e8879..69b708f 100644
|
||||
-#define AUTHORS proper_name ("FIXME unknown")
|
||||
+#define AUTHORS proper_name ("David MacKenzie")
|
||||
|
||||
void
|
||||
usage (int status)
|
||||
/* The name this program was run with. */
|
||||
char *program_name;
|
||||
diff --git a/AUTHORS b/AUTHORS
|
||||
index 404cf70..666edc1 100644
|
||||
--- a/AUTHORS
|
||||
|
@ -90,10 +90,10 @@ index 25bc965..134310b 100644
|
||||
-# endif
|
||||
+#endif
|
||||
|
||||
/* Prefer EBADF to ENOSYS if both error numbers apply. */
|
||||
if (errno == ENOSYS)
|
||||
/* Prefer EBADF to ENOSYS if both error numbers apply. */
|
||||
if (errno == ENOSYS)
|
||||
@@ -170,9 +180,9 @@ gl_futimens (int fd ATTRIBUTE_UNUSED,
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
-# if HAVE_WORKING_UTIMES
|
||||
|
@ -20,4 +20,4 @@
|
||||
+acl2=`cd b && getfacl file`
|
||||
test "$acl1" = "$acl2" || fail=1
|
||||
|
||||
exit $fail
|
||||
(exit $fail); exit $fail
|
||||
|
@ -10,65 +10,12 @@ diff -urp coreutils-6.10-orig/lib/getugroups.c coreutils-6.10/lib/getugroups.c
|
||||
+
|
||||
#include "getugroups.h"
|
||||
|
||||
#include <stdio.h> /* grp.h on alpha OSF1 V2.0 uses "FILE *". */
|
||||
#include <limits.h>
|
||||
@@ -114,3 +117,4 @@ getugroups (int maxcount, GETGROUPS_T *g
|
||||
|
||||
return count;
|
||||
}
|
||||
+#endif /* have getgrouplist */
|
||||
diff -urp coreutils-6.10-orig/lib/mgetgroups.c coreutils-6.10/lib/mgetgroups.c
|
||||
--- coreutils-6.10-orig/lib/mgetgroups.c 2007-11-25 14:23:31.000000000 +0100
|
||||
+++ coreutils-6.10/lib/mgetgroups.c 2008-01-24 16:41:15.000000000 +0100
|
||||
@@ -43,9 +43,17 @@ mgetgroups (const char *username, gid_t
|
||||
int ng;
|
||||
GETGROUPS_T *g;
|
||||
|
||||
- max_n_groups = (username
|
||||
- ? getugroups (0, NULL, username, gid)
|
||||
- : getgroups (0, NULL));
|
||||
+ if (!username)
|
||||
+ max_n_groups = getgroups(0, NULL);
|
||||
+ else
|
||||
+ {
|
||||
+#ifdef HAVE_GETGROUPLIST
|
||||
+ max_n_groups = 0;
|
||||
+ getgrouplist (username, gid, NULL, &max_n_groups);
|
||||
+#else
|
||||
+ max_n_groups = getugroups (0, NULL, username, gid);
|
||||
+#endif
|
||||
+ }
|
||||
|
||||
/* If we failed to count groups with NULL for a buffer,
|
||||
try again with a non-NULL one, just in case. */
|
||||
@@ -62,9 +70,25 @@ mgetgroups (const char *username, gid_t
|
||||
if (g == NULL)
|
||||
return -1;
|
||||
|
||||
- ng = (username
|
||||
- ? getugroups (max_n_groups, g, username, gid)
|
||||
- : getgroups (max_n_groups, g));
|
||||
+ if (!username)
|
||||
+ ng = getgroups (max_n_groups, g);
|
||||
+ else
|
||||
+ {
|
||||
+#ifdef HAVE_GETGROUPLIST
|
||||
+ int e;
|
||||
+ ng = max_n_groups;
|
||||
+ while ((e = getgrouplist (username, gid, g, &ng)) == -1
|
||||
+ && ng > max_n_groups)
|
||||
+ {
|
||||
+ max_n_groups = ng;
|
||||
+ g = xrealloc (g, max_n_groups * sizeof (GETGROUPS_T));
|
||||
+ }
|
||||
+ if (e == -1)
|
||||
+ ng = -1;
|
||||
+#else
|
||||
+ ng = getugroups (max_n_groups, g, username, gid);
|
||||
+#endif
|
||||
+ }
|
||||
|
||||
if (ng < 0)
|
||||
{
|
||||
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
|
||||
|
@ -379,17 +379,8 @@ diff -urN coreutils-6.12-orig/tests/Makefile.am coreutils-6.12/tests/Makefile.am
|
||||
+/* The number of bytes used for tab. */
|
||||
+static size_t tablen = 0;
|
||||
|
||||
static struct option const longopts[] =
|
||||
{
|
||||
@@ -190,6 +206,8 @@
|
||||
|
||||
/* Fill in the `fields' structure in LINE. */
|
||||
|
||||
+/* Fill in the `fields' structure in LINE. */
|
||||
+
|
||||
static void
|
||||
xfields (struct line *line)
|
||||
{
|
||||
/* If nonzero, check that the input is correctly ordered. */
|
||||
static enum
|
||||
@@ -199,10 +217,11 @@
|
||||
if (ptr == lim)
|
||||
return;
|
||||
@ -550,21 +541,9 @@ diff -urN coreutils-6.12-orig/tests/Makefile.am coreutils-6.12/tests/Makefile.am
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/* Read a line from FP into LINE and split it into fields.
|
||||
Return true if successful. */
|
||||
|
||||
@@ -249,6 +410,11 @@
|
||||
line->nfields_allocated = 0;
|
||||
line->nfields = 0;
|
||||
line->fields = NULL;
|
||||
+#if HAVE_MBRTOWC
|
||||
+ if (MB_CUR_MAX > 1)
|
||||
+ xfields_multibyte (line);
|
||||
+ else
|
||||
+#endif
|
||||
xfields (line);
|
||||
return true;
|
||||
}
|
||||
static struct line *
|
||||
dup_line (const struct line *old)
|
||||
{
|
||||
@@ -377,11 +601,18 @@
|
||||
|
||||
/* Print the join of LINE1 and LINE2. */
|
||||
@ -703,7 +682,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
|
||||
- size_t len2; /* Length of fields to compare. */
|
||||
+ char *beg[2];
|
||||
+ char *copy[2];
|
||||
+ size_t len[2]; /* Length of fields to compare. */
|
||||
+ size_t len[2]; /* Length of fields to compare. */
|
||||
int diff;
|
||||
+ int i, j;
|
||||
|
||||
@ -1237,7 +1216,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
|
||||
/* The official name of this program (e.g., no `g' prefix). */
|
||||
@@ -35,23 +57,44 @@
|
||||
|
||||
#define AUTHORS "David MacKenzie"
|
||||
#define AUTHORS proper_name ("David MacKenzie")
|
||||
|
||||
+#define FATAL_ERROR(Message) \
|
||||
+ do \
|
||||
@ -1819,7 +1798,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
|
||||
+
|
||||
/* Specify the amount of main memory to use when sorting. */
|
||||
static void
|
||||
specify_sort_size (char const *s)
|
||||
specify_sort_size (int oi, char c, char const *s)
|
||||
@@ -1241,7 +1368,7 @@
|
||||
by KEY in LINE. */
|
||||
|
||||
@ -4043,3 +4022,18 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
|
||||
}
|
||||
|
||||
if (optind == argc)
|
||||
diff -urNp coreutils-6.12/src/join.c coreutils-6.12-orig/src/join.c
|
||||
--- coreutils-6.12/src/join.c 2008-07-16 14:08:01.000000000 +0200
|
||||
+++ coreutils-6.12-orig/src/join.c 2008-07-16 14:07:02.000000000 +0200
|
||||
@@ -489,6 +489,11 @@ get_line (FILE *fp, struct line *line, i
|
||||
line->nfields_allocated = 0;
|
||||
line->nfields = 0;
|
||||
line->fields = NULL;
|
||||
+#if HAVE_MBRTOWC
|
||||
+ if (MB_CUR_MAX > 1)
|
||||
+ xfields_multibyte (line);
|
||||
+ else
|
||||
+#endif
|
||||
xfields (line);
|
||||
|
||||
if (prevline[which - 1])
|
||||
|
@ -73,7 +73,7 @@ diff -urp coreutils-6.10-orig/man/chcon.1 coreutils-6.10/man/chcon.1
|
||||
+++ coreutils-6.10/man/chcon.1 2008-01-25 14:15:52.000000000 +0100
|
||||
@@ -1,7 +1,7 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
|
||||
.TH CHCON "1" "January 2008" "GNU coreutils 6.10" "User Commands"
|
||||
.TH CHCON "1" "May 2008" "GNU coreutils 6.12" "User Commands"
|
||||
.SH NAME
|
||||
-chcon \- change file security context
|
||||
+chcon \- change file SELinux security context
|
||||
@ -596,8 +596,8 @@ diff -urp coreutils-6.10-orig/src/ls.c coreutils-6.10/src/ls.c
|
||||
/* The name this program was run with. */
|
||||
char *program_name;
|
||||
@@ -314,7 +316,7 @@ static struct pending *pending_dirs;
|
||||
static time_t current_time = TYPE_MINIMUM (time_t);
|
||||
static int current_time_ns = -1;
|
||||
|
||||
static struct timespec current_time;
|
||||
|
||||
-static bool print_scontext;
|
||||
+static int print_scontext = 0;
|
||||
@ -728,33 +728,6 @@ diff -urp coreutils-6.10-orig/src/ls.c coreutils-6.10/src/ls.c
|
||||
|
||||
if (command_line_arg
|
||||
|| format_needs_stat
|
||||
@@ -2609,7 +2635,7 @@ gobble_file (char const *name, enum file
|
||||
{
|
||||
case DEREF_ALWAYS:
|
||||
err = stat (absolute_name, &f->stat);
|
||||
- do_deref = true;
|
||||
+ do_deref = true;
|
||||
break;
|
||||
|
||||
case DEREF_COMMAND_LINE_ARGUMENTS:
|
||||
@@ -2618,7 +2644,7 @@ gobble_file (char const *name, enum file
|
||||
{
|
||||
bool need_lstat;
|
||||
err = stat (absolute_name, &f->stat);
|
||||
- do_deref = true;
|
||||
+ do_deref = true;
|
||||
|
||||
if (dereference == DEREF_COMMAND_LINE_ARGUMENTS)
|
||||
break;
|
||||
@@ -2637,7 +2663,7 @@ gobble_file (char const *name, enum file
|
||||
|
||||
default: /* DEREF_NEVER */
|
||||
err = lstat (absolute_name, &f->stat);
|
||||
- do_deref = false;
|
||||
+ do_deref = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2659,7 +2685,7 @@ gobble_file (char const *name, enum file
|
||||
|
||||
f->stat_ok = true;
|
||||
@ -765,8 +738,8 @@ diff -urp coreutils-6.10-orig/src/ls.c coreutils-6.10/src/ls.c
|
||||
bool have_acl = false;
|
||||
int attr_len = (do_deref
|
||||
@@ -2667,9 +2694,7 @@ gobble_file (char const *name, enum file
|
||||
: lgetfilecon (absolute_name, &f->scontext));
|
||||
err = (attr_len < 0);
|
||||
f->scontext = xstrdup ("unlabeled");
|
||||
}
|
||||
|
||||
- if (err == 0)
|
||||
- have_acl = ! STREQ ("unlabeled", f->scontext);
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: The GNU core utilities: a set of tools commonly used in shell scripts
|
||||
Name: coreutils
|
||||
Version: 6.12
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: GPLv3+
|
||||
Group: System Environment/Base
|
||||
Url: http://www.gnu.org/software/coreutils/
|
||||
@ -316,6 +316,9 @@ fi
|
||||
/sbin/runuser
|
||||
|
||||
%changelog
|
||||
* Wed Jul 16 2008 Ondrej Vasik <ovasik@redhat.com> - 6.12-6
|
||||
- Get rid off fuzz in patches
|
||||
|
||||
* Fri Jul 04 2008 Ondrej Vasik <ovasik@redhat.com> - 6.12-5
|
||||
- fix authors for basename and echo
|
||||
- fix who info pages, print last runlevel only for printable
|
||||
|
@ -1,7 +1,7 @@
|
||||
--- 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"
|
||||
# define DEFAULT_ROOT_LOGIN_PATH "/usr/ucb:/bin:/usr/bin:/etc"
|
||||
#endif
|
||||
|
||||
+/* The default paths which get set are both bogus and oddly influenced
|
||||
|
Loading…
Reference in New Issue
Block a user