Mailinglist Archive: opensuse-commit (1262 mails)

< Previous Next >
commit coreutils
  • From: root@xxxxxxx (h_root)
  • Date: Fri, 1 Sep 2006 16:50:16 +0200 (CEST)
  • Message-id: <20060901145016.4EA8395228@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package coreutils
checked in at Fri Sep 1 16:50:16 CEST 2006.

--------
--- coreutils/coreutils.changes 2006-08-08 15:29:47.000000000 +0200
+++ coreutils/coreutils.changes 2006-09-01 15:36:55.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Sep 1 14:36:38 CEST 2006 - schwab@xxxxxxx
+
+- Fix sbin patch [#202632].
+- Fix missing locales.
+
+-------------------------------------------------------------------
@@ -139 +145 @@
-- Let `su' handle /sbin and /usr/sbin in path
+- Let `su' handle /sbin and /usr/sbin in path.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ coreutils.spec ++++++
--- /var/tmp/diff_new_pack.iQWZO1/_old 2006-09-01 16:49:47.000000000 +0200
+++ /var/tmp/diff_new_pack.iQWZO1/_new 2006-09-01 16:49:47.000000000 +0200
@@ -21,7 +21,7 @@
Autoreqprov: on
PreReq: %{install_info_prereq}
Version: 5.97
-Release: 2
+Release: 5
Summary: GNU Core Utilities
Source: coreutils-%{version}.tar.bz2
Source1: su.pamd
@@ -154,7 +154,8 @@
rm -f $RPM_BUILD_ROOT%{_bindir}/hostname
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/hostid.1
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/hostname.1
-rm -f $RPM_BUILD_ROOT%{_prefix}/share/locale/*/LC_TIME/coreutils.mo
+%find_lang %name
+cat bin.files %name.lang > extra-files

%post
%install_info --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
@@ -165,17 +166,20 @@
%clean
rm -rf $RPM_BUILD_ROOT

-%files -f bin.files
+%files -f extra-files
%defattr(-,root,root)
%doc README NEWS
%config /etc/pam.d/su
%config(noreplace) /etc/default/su
%{_bindir}/*
%doc %{_infodir}/coreutils.info*.gz
-%{_prefix}/share/locale/*/LC_MESSAGES/coreutils.mo
%doc %{_mandir}/man1/*.1.gz
+%dir %{_prefix}/share/locale/*/LC_TIME

%changelog -n coreutils
+* Fri Sep 01 2006 - schwab@xxxxxxx
+- Fix sbin patch [#202632].
+- Fix missing locales.
* Tue Aug 08 2006 - schwab@xxxxxxx
- Move sux to %%{_bindir}.
* Mon Jun 26 2006 - schwab@xxxxxxx
@@ -240,7 +244,7 @@
* Sun Sep 25 2005 - schwab@xxxxxxx
- Fix warning.
* Wed Aug 24 2005 - werner@xxxxxxx
-- Let `su' handle /sbin and /usr/sbin in path
+- Let `su' handle /sbin and /usr/sbin in path.
* Mon Aug 01 2005 - kukuk@xxxxxxx
- And yet another uninitialized variable fix.
* Fri Jul 29 2005 - schwab@xxxxxxx

++++++ coreutils-5.3.0-sbin4su.diff ++++++
--- /var/tmp/diff_new_pack.iQWZO1/_old 2006-09-01 16:49:48.000000000 +0200
+++ /var/tmp/diff_new_pack.iQWZO1/_new 2006-09-01 16:49:48.000000000 +0200
@@ -1,34 +1,35 @@
--- src/su.c
-+++ src/su.c 2005-08-24 14:42:13.000000000 +0200
-@@ -344,6 +344,121 @@
++++ src/su.c
+@@ -344,6 +344,117 @@
#endif /* !USE_PAM */
}

+/* Add or clear /sbin and /usr/sbin for the su command
-+ used without `-' */
++ used without `-'. */
+
-+#define SBIN_MASK 0x01 /* Set if /sbin is found in path */
-+#define USBIN_MASK 0x02 /* Set if /usr/sbin is found in path */
++/* Set if /sbin is found in path. */
++#define SBIN_MASK 0x01
++/* Set if /usr/sbin is found in path. */
++#define USBIN_MASK 0x02
+
+static char *
+addsbin (const char *const path)
+{
+ unsigned char smask = 0;
+ char *ptr, *tmp, *cur, *ret = NULL;
-+ size_t len = strlen (path);
++ size_t len;
+
+ if (!path || *path == 0)
+ return NULL;
+
-+ tmp = strdup (path);
-+ if (!tmp)
-+ return NULL;
-+
++ tmp = xstrdup (path);
+ cur = tmp;
-+ for (ptr = strsep (&cur, ":"); ptr; ptr = strsep (&cur, ":"))
++ for (ptr = strsep (&cur, ":"); ptr != NULL; ptr = strsep (&cur, ":"))
+ {
-+ smask |= (!strcmp (ptr, "/sbin")) ? SBIN_MASK : 0;
-+ smask |= (!strcmp (ptr, "/usr/sbin")) ? USBIN_MASK : 0;
++ if (!strcmp (ptr, "/sbin"))
++ smask |= SBIN_MASK;
++ if (!strcmp (ptr, "/usr/sbin"))
++ smask |= USBIN_MASK;
+ }
+
+ if ((smask & (USBIN_MASK|SBIN_MASK)) == (USBIN_MASK|SBIN_MASK))
@@ -37,17 +38,15 @@
+ return NULL;
+ }
+
++ len = strlen (path);
+ if (!(smask & USBIN_MASK))
+ len += strlen ("/usr/sbin:");
+
+ if (!(smask & SBIN_MASK))
+ len += strlen (":/sbin");
+
-+ ret = (char *) malloc (sizeof (char) * (len + 1));
-+ if (!ret)
-+ return NULL;
-+
-+ (void) strcpy (tmp, path);
++ ret = xmalloc (len + 1);
++ strcpy (tmp, path);
+
+ *ret = 0;
+ cur = tmp;
@@ -56,30 +55,30 @@
+ if (!strcmp (ptr, "."))
+ continue;
+ if (*ret)
-+ (void) strcat (ret, ":");
++ strcat (ret, ":");
+ if (!(smask & USBIN_MASK) && !strcmp (ptr, "/bin"))
+ {
-+ (void) strcat (ret, "/usr/sbin:");
-+ (void) strcat (ret, ptr);
++ strcat (ret, "/usr/sbin:");
++ strcat (ret, ptr);
+ smask |= USBIN_MASK;
+ continue;
+ }
+ if (!(smask & SBIN_MASK) && !strcmp (ptr, "/usr/bin"))
+ {
-+ (void) strcat (ret, ptr);
-+ (void) strcat (ret, ":/sbin");
++ strcat (ret, ptr);
++ strcat (ret, ":/sbin");
+ smask |= SBIN_MASK;
+ continue;
+ }
-+ (void) strcat (ret, ptr);
++ strcat (ret, ptr);
+ }
-+ free(tmp);
++ free (tmp);
+
+ if (!(smask & USBIN_MASK))
-+ (void) strcat (ret, ":/usr/sbin");
++ strcat (ret, ":/usr/sbin");
+
+ if (!(smask & SBIN_MASK))
-+ (void) strcat (ret, ":/sbin");
++ strcat (ret, ":/sbin");
+
+ return ret;
+}
@@ -96,10 +95,7 @@
+ if (!tmp)
+ return NULL;
+
-+ ret = (char *) malloc (sizeof (char) * (strlen (path) + 1));
-+ if (!ret)
-+ return NULL;
-+
++ ret = xmalloc (strlen (path) + 1);
+ *ret = 0;
+ cur = tmp;
+ for (ptr = strsep (&cur, ":"); ptr; ptr = strsep (&cur, ":"))
@@ -111,10 +107,10 @@
+ if (!strcmp (ptr, "/usr/local/sbin"))
+ continue;
+ if (*ret)
-+ (void)strcat (ret, ":");
-+ (void)strcat (ret, ptr);
++ strcat (ret, ":");
++ strcat (ret, ptr);
+ }
-+ free(tmp);
++ free (tmp);
+
+ return ret;
+}
@@ -122,7 +118,7 @@
/* Update `environ' for the new shell based on PW, with SHELL being
the value for the SHELL environment variable. */

-@@ -383,6 +498,22 @@
+@@ -383,6 +494,22 @@
DEFAULT_LOGIN_PATH)
: getdef_str ("SUPATH",
DEFAULT_ROOT_LOGIN_PATH)));

++++++ coreutils-5.97.diff ++++++
--- /var/tmp/diff_new_pack.iQWZO1/_old 2006-09-01 16:49:48.000000000 +0200
+++ /var/tmp/diff_new_pack.iQWZO1/_new 2006-09-01 16:49:48.000000000 +0200
@@ -523,35 +523,35 @@
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. */
-@@ -247,6 +278,45 @@
+@@ -247,10 +278,49 @@
static bool
correct_password (const struct passwd *pw)
{
+#ifdef USE_PAM
-+ struct passwd *lpw;
++ const struct passwd *lpw;
+ const char *cp;
+
+ retval = pam_start ("su", pw->pw_name, &conv, &pamh);
+ PAM_BAIL_P (return false);
+
-+ if (isatty (0) && (cp = ttyname (0)))
++ if (isatty (0) && (cp = ttyname (0)) != NULL)
+ {
-+ char *tty;
++ const char *tty;
+
+ if (strncmp (cp, "/dev/", 5) == 0)
+ tty = cp + 5;
+ else
+ tty = cp;
-+ retval = pam_set_item (pamh, PAM_TTY, (const void *) tty);
++ retval = pam_set_item (pamh, PAM_TTY, tty);
+ PAM_BAIL_P (return false);
+ }
+ cp = getlogin ();
-+ if (!(cp && *cp && (lpw = getpwnam (cp)) && lpw->pw_uid == getuid ()))
++ if (!(cp && *cp && (lpw = getpwnam (cp)) != NULL && lpw->pw_uid == getuid ()))
+ lpw = getpwuid (getuid ());
+ if (lpw)
+ {
-+ retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name);
-+ PAM_BAIL_P (return false);
++ retval = pam_set_item (pamh, PAM_RUSER, (const void *) lpw->pw_name);
++ PAM_BAIL_P (return false);
+ }
+ retval = pam_authenticate (pamh, 0);
+ PAM_BAIL_P (return false);
@@ -569,6 +569,11 @@
char *unencrypted, *encrypted, *correct;
#if HAVE_GETSPNAM && HAVE_STRUCT_SPWD_SP_PWDP
/* Shadow passwd stuff for SVR3 and maybe other systems. */
+- struct spwd *sp = getspnam (pw->pw_name);
++ const struct spwd *sp = getspnam (pw->pw_name);
+
+ endspent ();
+ if (sp)
@@ -271,6 +341,7 @@
encrypted = crypt (unencrypted, correct);
memset (unencrypted, 0, strlen (unencrypted));




++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread