openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2007
- 1 participants
- 1082 discussions
Hello community,
here is the log from the commit of package yast2-ncurses
checked in at Wed May 30 01:19:04 CEST 2007.
--------
--- yast2-ncurses/yast2-ncurses.changes 2007-05-10 10:23:28.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-ncurses/yast2-ncurses.changes 2007-05-29 16:32:45.623038000 +0200
@@ -1,0 +2,26 @@
+Tue May 29 13:03:07 CEST 2007 - kmachalkova(a)suse.cz
+
+- Removed obsolete save/load selection stuff + related NCPkgPopupFile
+ class - replaced by save/load pkgs & patterns (FaTE #300729)
+- Improved usability of cancel dialog in pkg manager (#274774)
+- Fix disappearing 'Etc./All Packages List' submenu after unchecking
+ AutoDependency Check
+- Place all popup dialogs in pkg manager to the centre of the screen
+ and calculate their size relatively to the screen size (if applicable)
+ (#275610)
+- 2.15.17
+
+-------------------------------------------------------------------
+Wed May 23 13:54:16 CEST 2007 - gs(a)suse.de
+
+- Package Installation: check the partition size to prevent
+ division by zero during disk space calculation (bug #270836)
+
+-------------------------------------------------------------------
+Wed May 16 13:15:56 CEST 2007 - gs(a)suse.de
+
+- Move all files related to package installation to subdir 'pkg'
+ and create a separate library libpy2ncurses_pkg (not yet loaded
+ as a plugin).
+
+-------------------------------------------------------------------
Old:
----
yast2-ncurses-2.15.16.tar.bz2
New:
----
yast2-ncurses-2.15.17.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ncurses.spec ++++++
--- /var/tmp/diff_new_pack.va4488/_old 2007-05-30 01:18:48.000000000 +0200
+++ /var/tmp/diff_new_pack.va4488/_new 2007-05-30 01:18:48.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-ncurses (Version 2.15.16)
+# spec file for package yast2-ncurses (Version 2.15.17)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-ncurses
-Version: 2.15.16
+Version: 2.15.17
Release: 1
License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-ncurses-2.15.16.tar.bz2
+Source0: yast2-ncurses-2.15.17.tar.bz2
prefix: /usr
BuildRequires: doxygen gcc-c++ libzypp-devel yast2-core-devel yast2-devtools
BuildRequires: blocxx-devel libxcrypt-devel ncurses-devel
@@ -44,7 +44,7 @@
%prep
-%setup -n yast2-ncurses-2.15.16
+%setup -n yast2-ncurses-2.15.17
%build
%{prefix}/bin/y2tool y2autoconf
@@ -64,6 +64,7 @@
%suse_update_desktop_file -d ycc_${d%.desktop} ${d%.desktop}
done
rm $RPM_BUILD_ROOT/%{_libdir}/YaST2/plugin/libpy2ncurses.la
+rm $RPM_BUILD_ROOT/%{_libdir}/YaST2/plugin/libpy2ncurses_pkg.la
%clean
rm -rf "$RPM_BUILD_ROOT"
@@ -72,11 +73,30 @@
%defattr (-, root, root)
%{_libdir}/YaST2/plugin/libpy2ncurses.so.*
%{_libdir}/YaST2/plugin/libpy2ncurses.so
+%{_libdir}/YaST2/plugin/libpy2ncurses_pkg.so.*
+%{_libdir}/YaST2/plugin/libpy2ncurses_pkg.so
/usr/share/YaST2/data/pkg_layout.ycp
/usr/share/YaST2/data/you_layout.ycp
%doc %{prefix}/share/doc/packages/yast2-ncurses
%changelog
+* Tue May 29 2007 - kmachalkova(a)suse.cz
+- Removed obsolete save/load selection stuff + related NCPkgPopupFile
+ class - replaced by save/load pkgs & patterns (FaTE #300729)
+- Improved usability of cancel dialog in pkg manager (#274774)
+- Fix disappearing 'Etc./All Packages List' submenu after unchecking
+ AutoDependency Check
+- Place all popup dialogs in pkg manager to the centre of the screen
+ and calculate their size relatively to the screen size (if applicable)
+ (#275610)
+- 2.15.17
+* Wed May 23 2007 - gs(a)suse.de
+- Package Installation: check the partition size to prevent
+ division by zero during disk space calculation (bug #270836)
+* Wed May 16 2007 - gs(a)suse.de
+- Move all files related to package installation to subdir 'pkg'
+ and create a separate library libpy2ncurses_pkg (not yet loaded
+ as a plugin).
* Thu May 10 2007 - kmachalkova(a)suse.cz
- Replace &#xy; elements in richtext by their ascii character
equivalents (#269919)
++++++ yast2-ncurses-2.15.16.tar.bz2 -> yast2-ncurses-2.15.17.tar.bz2 ++++++
++++ 28902 lines of diff (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package xorg-x11-driver-video
checked in at Wed May 30 01:18:39 CEST 2007.
--------
--- xorg-x11-driver-video/xorg-x11-driver-video.changes 2007-05-23 23:04:27.000000000 +0200
+++ /mounts/work_src_done/STABLE/xorg-x11-driver-video/xorg-x11-driver-video.changes 2007-05-29 16:55:56.777747000 +0200
@@ -1,0 +2,6 @@
+Tue May 29 16:55:35 CEST 2007 - sndirsch(a)suse.de
+
+- xf86-video-ati-rs482-singledac.diff:
+ * rs480: only has single dac (Bug #276475)
+
+-------------------------------------------------------------------
New:
----
xf86-video-ati-rs482-singledac.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xorg-x11-driver-video.spec ++++++
--- /var/tmp/diff_new_pack.as1275/_old 2007-05-30 01:18:18.000000000 +0200
+++ /var/tmp/diff_new_pack.as1275/_new 2007-05-30 01:18:18.000000000 +0200
@@ -15,7 +15,7 @@
BuildRequires: Mesa-devel libdrm-devel pkgconfig xorg-x11-proto-devel xorg-x11-server-sdk
URL: http://xorg.freedesktop.org/
Version: 7.2
-Release: 106
+Release: 110
License: X11/MIT
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/X11/Servers/XF86_4
@@ -84,6 +84,7 @@
Patch18: radeon-vbios-ppc.diff
Patch27: xf86-video-ati-mergedfb-dpi.diff
Patch28: xf86-video-ati.randr12.diff
+Patch29: xf86-video-ati-rs482-singledac.diff
Patch30: xf86-video-mga.randr12.diff
Patch33: bug-263199_radeon-autocrt.diff
@@ -113,6 +114,7 @@
%patch27 -p0
popd
pushd xf86-video-ati-*
+%patch29 -p1
%patch33 -p1
popd
pushd xf86-video-nv-*/src
@@ -261,6 +263,9 @@
%{_mandir}/man4/*
%changelog
+* Tue May 29 2007 - sndirsch(a)suse.de
+- xf86-video-ati-rs482-singledac.diff:
+ * rs480: only has single dac (Bug #276475)
* Wed May 23 2007 - sndirsch(a)suse.de
- fixed rpmlint library-without-ldconfig-postin errors
* Tue May 22 2007 - sndirsch(a)suse.de
++++++ xf86-video-ati-rs482-singledac.diff ++++++
diff-tree 5aa603bcabbb077dec169c48438c2e2ebe1195d7 (from c52322354fe64725733842b3356798c50e7735d5)
Author: Dave Airlie <airlied(a)nx6125b.(none)>
Date: Tue May 29 07:23:24 2007 +1000
rs480: only has single dac
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index a812195..b0e4037 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1720,7 +1720,7 @@ static Bool RADEONPreInitChipType(ScrnIn
case PCI_CHIP_RS482_5974:
info->ChipFamily = CHIP_FAMILY_RS400;
info->IsIGP = TRUE;
- /*info->HasSingleDAC = TRUE;*/ /* ??? */
+ info->HasSingleDAC = TRUE;
break;
case PCI_CHIP_RV410_564A:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package util-linux-crypto
checked in at Wed May 30 01:18:01 CEST 2007.
--------
--- util-linux-crypto/util-linux-crypto.changes 2007-05-09 14:52:45.000000000 +0200
+++ /mounts/work_src_done/STABLE/util-linux-crypto/util-linux-crypto.changes 2007-05-29 16:18:25.000000000 +0200
@@ -1,0 +2,8 @@
+Tue May 29 15:58:44 CEST 2007 - lnussel(a)suse.de
+
+- fix segfault when trying to open a non existing device
+- fix gcc warnings
+- add Short-Description to boot.crypto
+- use %find_lang
+
+-------------------------------------------------------------------
New:
----
cryptsetup-luks-implicit-declarations.diff
cryptsetup-luks-uninitialized.diff
cryptsetup-luks-warnings.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ util-linux-crypto.spec ++++++
--- /var/tmp/diff_new_pack.p26554/_old 2007-05-30 01:17:38.000000000 +0200
+++ /var/tmp/diff_new_pack.p26554/_new 2007-05-30 01:17:38.000000000 +0200
@@ -22,7 +22,7 @@
Group: System/Base
Autoreqprov: on
Version: 2.12r
-Release: 33
+Release: 39
Summary: A Collection of Basic File System Encryption Utilities
Source: cryptsetup-luks-%csver.tar.bz2
Source1: hashalot-%haver.tar.bz2
@@ -35,7 +35,10 @@
# use this to create the tarball from svn
Source99: cryptsetup-mktar
Patch0: dmconvert-0.2-uninitialized.patch
-Patch1: cryptsetup-luks-libnostderr.diff
+Patch1: cryptsetup-luks-uninitialized.diff
+Patch2: cryptsetup-luks-implicit-declarations.diff
+Patch3: cryptsetup-luks-warnings.diff
+Patch4: cryptsetup-luks-libnostderr.diff
Patch10: hashalot-fixes.diff
Patch11: hashalot-libgcrypt.diff
Patch12: hashalot-ctrl-d.diff
@@ -79,6 +82,9 @@
%patch0
cd cryptsetup-luks-%csver
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
cd ..
%patch10
%patch11
@@ -142,6 +148,8 @@
# man page
install -d -m755 %{buildroot}%{_mandir}/man5
install -m644 %{SOURCE92} %{buildroot}%{_mandir}/man5
+#
+%find_lang %name --all-name
%post
/sbin/ldconfig
@@ -153,7 +161,7 @@
%clean
rm -rf $RPM_BUILD_ROOT
-%files
+%files -f %name.lang
%defattr(-,root,root)
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/crypttab
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/cryptotab
@@ -175,6 +183,11 @@
%{_libdir}/libcryptsetup.so
%changelog
+* Tue May 29 2007 - lnussel(a)suse.de
+- fix segfault when trying to open a non existing device
+- fix gcc warnings
+- add Short-Description to boot.crypto
+- use %%find_lang
* Wed May 09 2007 - lnussel(a)suse.de
- boot.crypto: implement 'status'
- boot.crypto: accept argument to start/stop single devices
++++++ boot.crypto ++++++
--- util-linux-crypto/boot.crypto 2007-05-09 14:51:18.000000000 +0200
+++ /mounts/work_src_done/STABLE/util-linux-crypto/boot.crypto 2007-05-29 16:06:42.000000000 +0200
@@ -29,6 +29,7 @@
# Default-Start: B
# Default-Stop:
# Description: Enable crypto file systems before leaving boot phase
+# Short-Description: Enable crypto file systems before leaving boot phase
### END INIT INFO
# Determine the base and follow a runlevel link name.
++++++ cryptsetup-luks-implicit-declarations.diff ++++++
fix implicit function declarations
Signed-off-by: Ludwig Nussel <ludwig.nussel(a)suse.de>
Index: cryptsetup-luks-1.0.4_SVN30/lib/internal.h
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/internal.h
+++ cryptsetup-luks-1.0.4_SVN30/lib/internal.h
@@ -62,6 +62,9 @@ int hash(const char *backend_name, const
struct setup_backend *get_setup_backend(const char *name);
void put_setup_backend(struct setup_backend *backend);
+void hexprint(char *d, int n);
+
+int sector_size_for_device(const char *device);
ssize_t write_blockwise(int fd, const void *buf, size_t count);
ssize_t read_blockwise(int fd, void *_buf, size_t count);
ssize_t write_lseek_blockwise(int fd, const char *buf, size_t count, off_t offset);
Index: cryptsetup-luks-1.0.4_SVN30/lib/libcryptsetup.h
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/libcryptsetup.h
+++ cryptsetup-luks-1.0.4_SVN30/lib/libcryptsetup.h
@@ -45,6 +45,8 @@ int crypt_luksDelKey(struct crypt_option
int crypt_luksAddKey(struct crypt_options *options);
int crypt_luksUUID(struct crypt_options *options);
int crypt_isLuks(struct crypt_options *options);
+int crypt_luksFormat(struct crypt_options *options);
+int crypt_luksDump(struct crypt_options *options);
void crypt_get_error(char *buf, size_t size);
void crypt_put_options(struct crypt_options *options);
Index: cryptsetup-luks-1.0.4_SVN30/lib/setup.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/setup.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/setup.c
@@ -107,7 +107,7 @@ static int interactive_pass(const char *
{
struct termios orig, tmp;
int failed = -1;
- int infd, outfd;
+ int infd = STDIN_FILENO, outfd;
if (maxlen < 1)
goto out_err;
Index: cryptsetup-luks-1.0.4_SVN30/lib/utils.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/utils.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/utils.c
@@ -9,6 +9,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/ioctl.h>
#include <fcntl.h>
#include "libcryptsetup.h"
Index: cryptsetup-luks-1.0.4_SVN30/luks/af.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/luks/af.c
+++ cryptsetup-luks-1.0.4_SVN30/luks/af.c
@@ -30,6 +30,7 @@
#include <errno.h>
#include "sha1.h"
#include "XORblock.h"
+#include "random.h"
/* diffuse: Information spreading over the whole dataset with
* the help of sha512.
Index: cryptsetup-luks-1.0.4_SVN30/luks/keyencryption.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/luks/keyencryption.c
+++ cryptsetup-luks-1.0.4_SVN30/luks/keyencryption.c
@@ -40,6 +40,9 @@
(__a - 1) / __b + 1; \
})
+static inline int round_up_modulo(int x, int m) {
+ return div_round_up(x, m) * m;
+}
static int setup_mapping(const char *cipher, const char *name,
const char *device, unsigned int payloadOffset,
Index: cryptsetup-luks-1.0.4_SVN30/luks/keymanage.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/luks/keymanage.c
+++ cryptsetup-luks-1.0.4_SVN30/luks/keymanage.c
@@ -141,7 +141,7 @@ int LUKS_write_phdr(const char *device,
return r;
}
-inline int round_up_modulo(int x, int m) {
+static inline int round_up_modulo(int x, int m) {
return div_round_up(x, m) * m;
}
Index: cryptsetup-luks-1.0.4_SVN30/src/cryptsetup.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/src/cryptsetup.c
+++ cryptsetup-luks-1.0.4_SVN30/src/cryptsetup.c
@@ -4,6 +4,7 @@
#include <stdint.h>
#include <inttypes.h>
#include <errno.h>
+#include <unistd.h>
#include <assert.h>
#include <libcryptsetup.h>
@@ -13,6 +14,9 @@
#include "cryptsetup.h"
+// XXX!
+int LUKS_is_last_keyslot(const char *device, unsigned int keyIndex);
+
static int opt_verbose = 1;
static char *opt_cipher = NULL;
static char *opt_hash = DEFAULT_HASH;
++++++ cryptsetup-luks-libnostderr.diff ++++++
--- /var/tmp/diff_new_pack.p26554/_old 2007-05-30 01:17:38.000000000 +0200
+++ /var/tmp/diff_new_pack.p26554/_new 2007-05-30 01:17:38.000000000 +0200
@@ -2,11 +2,11 @@
Signed-off-by: Ludwig Nussel <ludwig.nussel(a)suse.de>
-Index: cryptsetup-luks-1.0.4_SVN29/lib/setup.c
+Index: cryptsetup-luks-1.0.4_SVN30/lib/setup.c
===================================================================
---- cryptsetup-luks-1.0.4_SVN29.orig/lib/setup.c
-+++ cryptsetup-luks-1.0.4_SVN29/lib/setup.c
-@@ -98,7 +98,7 @@ static int timed_read(int fd, char *pass
+--- cryptsetup-luks-1.0.4_SVN30.orig/lib/setup.c
++++ cryptsetup-luks-1.0.4_SVN30/lib/setup.c
+@@ -96,7 +96,7 @@ static int timed_read(int fd, char *pass
if (select(fd+1, &fds, NULL, NULL, &t) > 0)
failed = untimed_read(fd, pass, maxlen);
else
@@ -15,7 +15,7 @@
return failed;
}
-@@ -197,14 +197,16 @@ static int get_key(struct crypt_options
+@@ -195,14 +195,16 @@ static int get_key(struct crypt_options
pass = safe_alloc(512);
if (!pass || (i = interactive_pass(prompt, pass, 512, options->timeout))) {
@@ -34,7 +34,7 @@
goto out_err;
}
memset(pass_verify, 0, sizeof(pass_verify));
-@@ -385,7 +387,7 @@ static int parse_into_name_and_mode(cons
+@@ -383,7 +385,7 @@ static int parse_into_name_and_mode(cons
strncpy(mode,"cbc-plain",10);
}
else {
@@ -43,7 +43,7 @@
return -EINVAL;
}
}
-@@ -643,7 +645,6 @@ start:
+@@ -642,7 +644,6 @@ start:
r = -EINVAL; goto out;
}
if((r = LUKS_open_any_key(options->device, password, passwordLen, &hdr, &mk, backend)) < 0) {
@@ -51,7 +51,7 @@
goto out1;
}
-@@ -718,7 +719,7 @@ static int __crypt_luks_add_key(int arg,
+@@ -716,7 +717,7 @@ static int __crypt_luks_add_key(int arg,
r = -EINVAL; goto out;
}
if(LUKS_open_any_key(device, password, passwordLen, &hdr, &mk, backend) < 0) {
@@ -60,7 +60,7 @@
r = -EPERM; goto out;
}
safe_free(password);
-@@ -761,7 +762,7 @@ static int __crypt_luks_del_key(int arg,
+@@ -759,7 +760,7 @@ static int __crypt_luks_del_key(int arg,
}
openedIndex = LUKS_open_any_key(device, password, passwordLen, &hdr, &mk, backend);
if(openedIndex < 0 || keyIndex == openedIndex) {
@@ -69,10 +69,10 @@
r = -EPERM; goto out;
}
}
-Index: cryptsetup-luks-1.0.4_SVN29/luks/keymanage.c
+Index: cryptsetup-luks-1.0.4_SVN30/luks/keymanage.c
===================================================================
---- cryptsetup-luks-1.0.4_SVN29.orig/luks/keymanage.c
-+++ cryptsetup-luks-1.0.4_SVN29/luks/keymanage.c
+--- cryptsetup-luks-1.0.4_SVN30.orig/luks/keymanage.c
++++ cryptsetup-luks-1.0.4_SVN30/luks/keymanage.c
@@ -76,20 +76,20 @@ int LUKS_read_phdr(const char *device, s
devfd = open(device,O_RDONLY | O_DIRECT | O_SYNC);
@@ -151,11 +151,11 @@
return -EINVAL;
}
-Index: cryptsetup-luks-1.0.4_SVN29/lib/utils.c
+Index: cryptsetup-luks-1.0.4_SVN30/lib/utils.c
===================================================================
---- cryptsetup-luks-1.0.4_SVN29.orig/lib/utils.c
-+++ cryptsetup-luks-1.0.4_SVN29/lib/utils.c
-@@ -225,7 +225,7 @@ ssize_t read_blockwise(int fd, void *ori
+--- cryptsetup-luks-1.0.4_SVN30.orig/lib/utils.c
++++ cryptsetup-luks-1.0.4_SVN30/lib/utils.c
+@@ -226,7 +226,7 @@ ssize_t read_blockwise(int fd, void *ori
while(count) {
r = read(fd,padbuf,bsize);
if(r < 0 || r != bsize) {
@@ -164,11 +164,11 @@
goto out;
}
step = count<bsize?count:bsize;
-Index: cryptsetup-luks-1.0.4_SVN29/luks/keyencryption.c
+Index: cryptsetup-luks-1.0.4_SVN30/luks/keyencryption.c
===================================================================
---- cryptsetup-luks-1.0.4_SVN29.orig/luks/keyencryption.c
-+++ cryptsetup-luks-1.0.4_SVN29/luks/keyencryption.c
-@@ -58,7 +58,7 @@ static int setup_mapping(const char *cip
+--- cryptsetup-luks-1.0.4_SVN30.orig/luks/keyencryption.c
++++ cryptsetup-luks-1.0.4_SVN30/luks/keyencryption.c
+@@ -61,7 +61,7 @@ static int setup_mapping(const char *cip
* device's sector size, otherwise the mapping will be refused.
*/
if(device_sector_size < 0) {
@@ -177,7 +177,7 @@
return -EINVAL;
}
options->size = round_up_modulo(srcLength,device_sector_size)/SECTOR_SIZE;
-@@ -118,7 +118,8 @@ static int LUKS_endec_template(char *src
+@@ -121,7 +121,8 @@ static int LUKS_endec_template(char *src
r = setup_mapping(dmCipherSpec,name,device,hdr->payloadOffset,key,keyLength,sector,srcLength,backend,mode);
if(r < 0) {
++++++ cryptsetup-luks-uninitialized.diff ++++++
fix segfault when trying to open a non existing device
Signed-off-by: Ludwig Nussel <ludwig.nussel(a)suse.de>
Index: cryptsetup-luks-1.0.4_SVN30/lib/setup.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/setup.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/setup.c
@@ -608,7 +608,7 @@ out:
static int __crypt_luks_open(int arg, struct setup_backend *backend, struct crypt_options *options)
{
- struct luks_masterkey *mk;
+ struct luks_masterkey *mk=NULL;
struct luks_phdr hdr;
char *password; int passwordLen;
struct device_infos infos;
++++++ cryptsetup-luks-warnings.diff ++++++
fix some gcc warnings
Signed-off-by: Ludwig Nussel <ludwig.nussel(a)suse.de>
Index: cryptsetup-luks-1.0.4_SVN30/lib/libdevmapper.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/libdevmapper.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/libdevmapper.c
@@ -258,7 +258,7 @@ static int dm_query_device(int details,
options->skip = 0;
options->size = length;
if (details) {
- char *cipher, *key_, *device, *tmp;
+ char *cipher, *key_, *device;
uint64_t val64;
set_error("Invalid dm table");
Index: cryptsetup-luks-1.0.4_SVN30/lib/setup.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/setup.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/setup.c
@@ -57,8 +57,6 @@ static int setup_enter(struct setup_back
static int setup_leave(struct setup_backend *backend)
{
- const char *error;
-
if (backend)
backend->exit();
Index: cryptsetup-luks-1.0.4_SVN30/lib/utils.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/lib/utils.c
+++ cryptsetup-luks-1.0.4_SVN30/lib/utils.c
@@ -173,7 +173,7 @@ ssize_t write_blockwise(int fd, const vo
{
char *padbuf; char *padbuf_base;
char *buf = (char *)orig_buf;
- int r;
+ int r = 0;
int hangover; int solid; int bsize;
if ((bsize = sector_size(fd)) < 0)
@@ -213,7 +213,7 @@ ssize_t write_blockwise(int fd, const vo
ssize_t read_blockwise(int fd, void *orig_buf, size_t count) {
char *padbuf; char *padbuf_base;
char *buf = (char *)orig_buf;
- int r;
+ int r = 0;
int step;
int bsize;
Index: cryptsetup-luks-1.0.4_SVN30/luks/keymanage.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/luks/keymanage.c
+++ cryptsetup-luks-1.0.4_SVN30/luks/keymanage.c
@@ -417,7 +417,7 @@ static int wipe(const char *device, unsi
int LUKS_del_key(const char *device, unsigned int keyIndex)
{
struct luks_phdr hdr;
- unsigned int i, startOffset, endOffset, stripesLen;
+ unsigned int startOffset, endOffset, stripesLen;
int r;
r = LUKS_read_phdr(device, &hdr);
Index: cryptsetup-luks-1.0.4_SVN30/luks/random.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/luks/random.c
+++ cryptsetup-luks-1.0.4_SVN30/luks/random.c
@@ -13,7 +13,7 @@
int getRandom(char *buf, size_t len)
{
- int randomfd, r = 0, index = 0;
+ int randomfd, r = 0;
//FIXME Run a FIPS test for the random device or include
// PRNG if urandom not avail.
Index: cryptsetup-luks-1.0.4_SVN30/src/cryptsetup.c
===================================================================
--- cryptsetup-luks-1.0.4_SVN30.orig/src/cryptsetup.c
+++ cryptsetup-luks-1.0.4_SVN30/src/cryptsetup.c
@@ -203,7 +203,8 @@ static int yesDialog(char *msg)
size_t size=0;
fprintf(stderr,"\nWARNING!\n========\n");
fprintf(stderr,"%s\n\nAre you sure? (Type uppercase yes): ",msg);
- getline(&answer,&size,stdin);
+ if(getline(&answer,&size,stdin) == -1)
+ return 0;
if(strcmp(answer,"YES\n") == 0)
r = 1;
free(answer);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package rfb
checked in at Wed May 30 01:17:17 CEST 2007.
--------
--- rfb/rfb.changes 2006-12-13 09:04:47.000000000 +0100
+++ /mounts/work_src_done/STABLE/rfb/rfb.changes 2007-05-29 11:42:17.000000000 +0200
@@ -1,0 +2,5 @@
+Tue May 29 11:41:45 CEST 2007 - anosek(a)suse.cz
+
+- changed BuildRequires xclass -> xclass-devel
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rfb.spec ++++++
--- /var/tmp/diff_new_pack.F21105/_old 2007-05-30 01:17:04.000000000 +0200
+++ /var/tmp/diff_new_pack.F21105/_new 2007-05-30 01:17:04.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rfb (Version 0.6.1)
#
-# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -11,13 +11,13 @@
# norootforbuild
Name: rfb
-BuildRequires: gcc-c++ xclass xorg-x11 xorg-x11-devel
+BuildRequires: gcc-c++ xclass-devel xorg-x11 xorg-x11-devel
License: GNU General Public License (GPL)
Group: System/X11/Utilities
Autoreqprov: on
Requires: xclass
Version: 0.6.1
-Release: 509
+Release: 540
URL: http://www.hexonet.de/software/rfb/
#Original source: http://www.hexonet.de/download/rfb-0.6.1.tar.gz
Source0: http://www.hexonet.de/download/rfb-0.6.1.tar.bz2
@@ -68,7 +68,9 @@
%doc %{_mandir}/man1/*.1*
/usr/bin/*
-%changelog -n rfb
+%changelog
+* Tue May 29 2007 - anosek(a)suse.cz
+- changed BuildRequires xclass -> xclass-devel
* Wed Dec 13 2006 - anosek(a)suse.cz
- changed prefix /usr/X11R6/bin -> /usr/bin
* Wed Jan 25 2006 - mls(a)suse.de
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package pinfo
checked in at Wed May 30 01:16:57 CEST 2007.
--------
--- pinfo/pinfo.changes 2007-03-29 17:07:08.000000000 +0200
+++ /mounts/work_src_done/STABLE/pinfo/pinfo.changes 2007-05-29 14:43:18.000000000 +0200
@@ -1,0 +2,26 @@
+Tue May 29 14:39:20 CEST 2007 - anosek(a)suse.cz
+
+- updated to version 0.6.9
+ * Nodes containing a "." are now correctly found
+ * Non-ASCII man pages are displayed correctly
+ * Improved the history behavior of the search input line
+ * Broken tag tables are now automatically fixed
+ * Don't segfault when a broken regexp is entered
+ * Fixed a number of segfaults caused by using uninitialized
+ pointers and off-by-1 errors
+ * Fixed heap corruption caused by non-ascii chars in info pages
+ * Fixed a lot of patch searching issues
+ * Fixed text display on narrow terminals
+ * Fixed highlighting of searches
+ * The default pinforc now uses the terminal's default foreground
+ and background colors. Thanks to Rob Funk for a patch.
+ * Use libreadline by default; readline version 4 is now required
+ * Better cooperation between ncurses and readline
+ * Fixed some memory leaks
+ * Got rid of tempnam() calls
+ * Use utf8 in documentation files and fixed typoes
+- fixed corrupted unicode characters in status line [#264229]
+ (ncursesw.patch)
+- using %find_lang macro in spec file
+
+-------------------------------------------------------------------
Old:
----
pinfo-0.6.8-nul-strings.patch
pinfo-0.6.8.tar.bz2
New:
----
pinfo-0.6.9-ncursesw.patch
pinfo-0.6.9-nul-strings.patch
pinfo-0.6.9.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pinfo.spec ++++++
--- /var/tmp/diff_new_pack.E13749/_old 2007-05-30 01:16:19.000000000 +0200
+++ /var/tmp/diff_new_pack.E13749/_new 2007-05-30 01:16:19.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package pinfo (Version 0.6.8)
+# spec file for package pinfo (Version 0.6.9)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -15,10 +15,11 @@
License: GNU General Public License (GPL)
Group: Productivity/Publishing/Texinfo
Autoreqprov: on
-Version: 0.6.8
-Release: 44
+Version: 0.6.9
+Release: 1
Source: %{name}-%{version}.tar.bz2
Patch1: %{name}-%{version}-nul-strings.patch
+Patch2: %{name}-%{version}-ncursesw.patch
URL: http://dione.cc/~pborys/software/pinfo/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Lynx-style Info Browser
@@ -36,6 +37,7 @@
%prep
%setup
%patch1
+%patch2
%build
%define sysconfdir /etc
@@ -50,6 +52,7 @@
%install
make DESTDIR=$RPM_BUILD_ROOT/ install
+%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -60,16 +63,38 @@
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
-%files
+%files -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%doc %{_mandir}/*/*
%doc %{_infodir}/pinfo.info.gz
%config /etc/pinforc
%{_prefix}/bin/pinfo
-%{_prefix}/share/locale/*/*/*
%changelog
+* Tue May 29 2007 - anosek(a)suse.cz
+- updated to version 0.6.9
+ * Nodes containing a "." are now correctly found
+ * Non-ASCII man pages are displayed correctly
+ * Improved the history behavior of the search input line
+ * Broken tag tables are now automatically fixed
+ * Don't segfault when a broken regexp is entered
+ * Fixed a number of segfaults caused by using uninitialized
+ pointers and off-by-1 errors
+ * Fixed heap corruption caused by non-ascii chars in info pages
+ * Fixed a lot of patch searching issues
+ * Fixed text display on narrow terminals
+ * Fixed highlighting of searches
+ * The default pinforc now uses the terminal's default foreground
+ and background colors. Thanks to Rob Funk for a patch.
+ * Use libreadline by default; readline version 4 is now required
+ * Better cooperation between ncurses and readline
+ * Fixed some memory leaks
+ * Got rid of tempnam() calls
+ * Use utf8 in documentation files and fixed typoes
+- fixed corrupted unicode characters in status line [#264229]
+ (ncursesw.patch)
+- using %%find_lang macro in spec file
* Thu Mar 29 2007 - rguenther(a)suse.de
- add ncurses-devel BuildRequires
* Wed Jan 25 2006 - mls(a)suse.de
++++++ pinfo-0.6.9-ncursesw.patch ++++++
--- configure
+++ configure
@@ -9904,7 +9904,7 @@
echo "$as_me:$LINENO: result: $curses_location/include/ncurses/ncurses.h" >&5
echo "${ECHO_T}$curses_location/include/ncurses/ncurses.h" >&6
curses_h="ncurses/ncurses.h"
- curses_libs="-L$curses_location/lib -lncurses"
+ curses_libs="-L$curses_location/lib -lncursesw"
curses_includes="-I$curses_location/include "
stop_searching=true
found_curses_h=true
@@ -9919,7 +9919,7 @@
echo "$as_me:$LINENO: result: $curses_location/include/ncurses.h" >&5
echo "${ECHO_T}$curses_location/include/ncurses.h" >&6
curses_h="ncurses.h"
- curses_libs="-L$curses_location/lib -lncurses"
+ curses_libs="-L$curses_location/lib -lncursesw"
curses_includes="-I$curses_location/include "
stop_searching=true
found_curses_h=true
@@ -9934,7 +9934,7 @@
echo "$as_me:$LINENO: result: $curses_location/include/curses.h" >&5
echo "${ECHO_T}$curses_location/include/curses.h" >&6
curses_h="curses.h"
- curses_libs="-L$curses_location/lib -lncurses"
+ curses_libs="-L$curses_location/lib -lncursesw"
curses_includes="-I$curses_location/include "
stop_searching=true
found_curses_h=true
@@ -10014,7 +10014,7 @@
echo "$as_me:$LINENO: result: /usr/local/include/ncurses.h" >&5
echo "${ECHO_T}/usr/local/include/ncurses.h" >&6
curses_h="ncurses.h"
- curses_libs="-L/usr/local/lib -lncurses"
+ curses_libs="-L/usr/local/lib -lncursesw"
curses_includes="-I/usr/local/include "
stop_searching=true
found_curses_h=true
@@ -10029,7 +10029,7 @@
echo "$as_me:$LINENO: result: /usr/local/include/ncurses/ncurses.h" >&5
echo "${ECHO_T}/usr/local/include/ncurses/ncurses.h" >&6
curses_h="ncurses/ncurses.h"
- curses_libs="-L/usr/local/lib -lncurses"
+ curses_libs="-L/usr/local/lib -lncursesw"
curses_includes="-I/usr/local/include "
stop_searching=true
found_curses_h=true
@@ -10045,7 +10045,7 @@
echo "$as_me:$LINENO: result: /usr/include/ncurses.h" >&5
echo "${ECHO_T}/usr/include/ncurses.h" >&6
curses_h="ncurses.h"
- curses_libs="-L/usr/lib -lncurses"
+ curses_libs="-L/usr/lib -lncursesw"
curses_includes="-I/usr/include "
stop_searching=true
found_curses_h=true
@@ -10060,7 +10060,7 @@
echo "$as_me:$LINENO: result: /usr/include/ncurses/ncurses.h" >&5
echo "${ECHO_T}/usr/include/ncurses/ncurses.h" >&6
curses_h="ncurses/ncurses.h"
- curses_libs="-L/usr/lib -lncurses"
+ curses_libs="-L/usr/lib -lncursesw"
curses_includes="-I/usr/include "
stop_searching=true
found_curses_h=true
@@ -10076,7 +10076,7 @@
echo "$as_me:$LINENO: result: /usr/local/include/curses.h" >&5
echo "${ECHO_T}/usr/local/include/curses.h" >&6
curses_h="curses.h"
- curses_libs="-L/usr/local/lib -lncurses"
+ curses_libs="-L/usr/local/lib -lncursesw"
curses_includes="-I/usr/local/include "
stop_searching=true
found_curses_h=true
@@ -10091,7 +10091,7 @@
echo "$as_me:$LINENO: result: /usr/local/include/curses/curses.h" >&5
echo "${ECHO_T}/usr/local/include/curses/curses.h" >&6
curses_h="curses/curses.h"
- curses_libs="-L/usr/local/lib -lncurses"
+ curses_libs="-L/usr/local/lib -lncursesw"
curses_includes="-I/usr/local/include "
stop_searching=true
found_curses_h=true
@@ -10107,7 +10107,7 @@
echo "$as_me:$LINENO: result: /usr/include/curses.h" >&5
echo "${ECHO_T}/usr/include/curses.h" >&6
curses_h="curses.h"
- curses_libs="-L/usr/lib -lncurses"
+ curses_libs="-L/usr/lib -lncursesw"
curses_includes="-I/usr/include "
stop_searching=true
found_curses_h=true
@@ -10122,7 +10122,7 @@
echo "$as_me:$LINENO: result: /usr/include/curses/curses.h" >&5
echo "${ECHO_T}/usr/include/curses/curses.h" >&6
curses_h="curses/curses.h"
- curses_libs="-L/usr/lib -lncurses"
+ curses_libs="-L/usr/lib -lncursesw"
curses_includes="-I/usr/include "
stop_searching=true
found_curses_h=true
--- macros/curses.m4
+++ macros/curses.m4
@@ -189,13 +189,13 @@
-L$curses_location/lib -lncursesw,
-I$curses_location/include )
AC_SEARCH_CURSES_FILE($curses_location/include, ncurses/ncurses.h,
- -L$curses_location/lib -lncurses,
+ -L$curses_location/lib -lncursesw,
-I$curses_location/include )
AC_SEARCH_CURSES_FILE($curses_location/include, ncurses.h,
- -L$curses_location/lib -lncurses,
+ -L$curses_location/lib -lncursesw,
-I$curses_location/include )
AC_SEARCH_CURSES_FILE($curses_location/include, curses.h,
- -L$curses_location/lib -lncurses,
+ -L$curses_location/lib -lncursesw,
-I$curses_location/include )
else
@@ -218,32 +218,32 @@
dnl after that, look for normal ncurses
AC_SEARCH_CURSES_FILE(/usr/local/include, ncurses.h,
- -L/usr/local/lib -lncurses,
+ -L/usr/local/lib -lncursesw,
-I/usr/local/include )
AC_SEARCH_CURSES_FILE(/usr/local/include, ncurses/ncurses.h,
- -L/usr/local/lib -lncurses,
+ -L/usr/local/lib -lncursesw,
-I/usr/local/include )
AC_SEARCH_CURSES_FILE(/usr/include, ncurses.h,
- -L/usr/lib -lncurses,
+ -L/usr/lib -lncursesw,
-I/usr/include )
AC_SEARCH_CURSES_FILE(/usr/include, ncurses/ncurses.h,
- -L/usr/lib -lncurses,
+ -L/usr/lib -lncursesw,
-I/usr/include )
dnl after that, look for curses
AC_SEARCH_CURSES_FILE(/usr/local/include, curses.h,
- -L/usr/local/lib -lncurses,
+ -L/usr/local/lib -lncursesw,
-I/usr/local/include )
AC_SEARCH_CURSES_FILE(/usr/local/include, curses/curses.h,
- -L/usr/local/lib -lncurses,
+ -L/usr/local/lib -lncursesw,
-I/usr/local/include )
AC_SEARCH_CURSES_FILE(/usr/include, curses.h,
- -L/usr/lib -lncurses,
+ -L/usr/lib -lncursesw,
-I/usr/include )
AC_SEARCH_CURSES_FILE(/usr/include, curses/curses.h,
- -L/usr/lib -lncurses,
+ -L/usr/lib -lncursesw,
-I/usr/include )
fi
++++++ pinfo-0.6.8-nul-strings.patch -> pinfo-0.6.9-nul-strings.patch ++++++
--- pinfo/pinfo-0.6.8-nul-strings.patch 2005-08-17 13:06:28.000000000 +0200
+++ /mounts/work_src_done/STABLE/pinfo/pinfo-0.6.9-nul-strings.patch 2007-05-29 14:14:34.000000000 +0200
@@ -1,29 +1,29 @@
--- src/filehandling_functions.c
+++ src/filehandling_functions.c
-@@ -237,6 +237,11 @@
- * with empty line.
- */
- strcpy (Buf[Lines], "\n");
-+ if (!Buf[Lines][0]) {
-+ /* skip those ^@^H[index lines (^@ = NUL) */
-+ xfree(Buf[Lines]);
-+ Lines--;
-+ }
- }
- while (Buf[Lines][0] != INFO_TAG); /* repeat until new node mark is found */
+@@ -311,6 +311,11 @@
+ i--;
+ }
+ }
++ if (!Buf[Lines][0]) {
++ /* skip those ^@^H[index lines (^@ = NUL) */
++ xfree(Buf[Lines]);
++ Lines--;
++ }
+ }
+ while (Buf[Lines][0] != INFO_TAG); /* repeat until new node mark is found */
--- src/video.c
+++ src/video.c
-@@ -67,6 +67,12 @@
- for (i = pos; (i < lines) && (i < pos + maxy - 2); i++)
- {
- int tmp = strlen (message[i]) - 1;
-+ if (tmp < 0) {
-+ fprintf(stderr,
-+ "%s:%d: BUG: strlen(message[%d]) == 0; please report!\n",
-+ __FILE__, __LINE__, i);
-+ tmp = 0;
-+ }
- message[i][tmp] = 0;
- if(tmp>column)
- mvaddstr (i + 1 - pos, 0, message[i]+column);
+@@ -91,6 +91,12 @@
+ if (!message[i]) continue;
+
+ int tmp = strlen(message[i]) - 1;
++ if (tmp < 0) {
++ fprintf(stderr,
++ "%s:%d: BUG: strlen(message[%d]) == 0; please report!\n",
++ __FILE__, __LINE__, i);
++ tmp = 0;
++ }
+ message[i][tmp] = 0;
+ if (tmp>column)
+ mvaddstr(i + 1 - pos, 0, message[i]+column);
++++++ pinfo-0.6.8.tar.bz2 -> pinfo-0.6.9.tar.bz2 ++++++
++++ 106155 lines of diff (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package pulseaudio
checked in at Wed May 30 01:16:46 CEST 2007.
--------
--- pulseaudio/pulseaudio.changes 2007-04-24 12:04:54.000000000 +0200
+++ /mounts/work_src_done/STABLE/pulseaudio/pulseaudio.changes 2007-05-29 19:24:46.000000000 +0200
@@ -1,0 +2,9 @@
+Tue May 29 19:22:56 CEST 2007 - tiwai(a)suse.de
+
+- fix possible remote DoS (#260326)
+- fix wrong endian conversion of float data
+- add a workaround for firefox with LD_PRELOAD wrapper
+- add the missing support of ioctls for JavaSound
+- increase ESD max samplesize
+
+-------------------------------------------------------------------
New:
----
pulseaudio-0.9.5-dos-vulns-fix.diff
pulseaudio-0.9.5-esd-max-samplesize.diff
pulseaudio-0.9.5-firefox-workaround.diff
pulseaudio-0.9.5-javasound-support.diff
pulseaudio-0.9.5-wrong-endian-convert.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pulseaudio.spec ++++++
--- /var/tmp/diff_new_pack.R14132/_old 2007-05-30 01:16:21.000000000 +0200
+++ /var/tmp/diff_new_pack.R14132/_new 2007-05-30 01:16:21.000000000 +0200
@@ -14,7 +14,7 @@
BuildRequires: alsa-devel doxygen jack-devel liboil-devel libsamplerate-devel libsndfile-devel
Summary: A Networked Sound Server
Version: 0.9.5
-Release: 38
+Release: 53
License: GNU General Public License (GPL), GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Group: System/Sound Daemons
Source: %{name}-%{version}.tar.bz2
@@ -22,6 +22,11 @@
Patch: pulseaudio-0.9.5-framesize.patch
Patch1: pulseaudio-0.9.5-suspend.patch
Patch2: pulseaudio-0.9.5-userconf.patch
+Patch3: pulseaudio-0.9.5-dos-vulns-fix.diff
+Patch4: pulseaudio-0.9.5-wrong-endian-convert.diff
+Patch5: pulseaudio-0.9.5-firefox-workaround.diff
+Patch6: pulseaudio-0.9.5-javasound-support.diff
+Patch7: pulseaudio-0.9.5-esd-max-samplesize.diff
URL: http://pulseaudio.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -69,10 +74,15 @@
Pierre Ossman
%prep
-%setup
+%setup -q
%patch
%patch1
%patch2 -p2
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
cp /usr/share/gettext/config.rpath .
%{?suse_update_config:%{suse_update_config -f}}
autoreconf --force --install
@@ -122,6 +132,12 @@
%{_includedir}/pulse*
%changelog
+* Tue May 29 2007 - tiwai(a)suse.de
+- fix possible remote DoS (#260326)
+- fix wrong endian conversion of float data
+- add a workaround for firefox with LD_PRELOAD wrapper
+- add the missing support of ioctls for JavaSound
+- increase ESD max samplesize
* Tue Apr 24 2007 - tiwai(a)suse.de
- disable static library, don't use ltdl install
- fix requires of devel package
++++++ pulseaudio-0.9.5-dos-vulns-fix.diff ++++++
Fix from Ubuntu:
Include fixes for potential DoS vuln from
http://pulseaudio.org/ticket/67
diff -urNad pulseaudio-0.9.5-7ubuntu1~/src/modules/module-volume-restore.c pulseaudio-0.9.5-7ubuntu1/src/modules/module-volume-restore.c
--- pulseaudio-0.9.5-7ubuntu1~/src/modules/module-volume-restore.c 2007-05-08 06:39:31.000000000 -0400
+++ pulseaudio-0.9.5-7ubuntu1/src/modules/module-volume-restore.c 2007-05-25 01:22:16.000000000 -0400
@@ -435,6 +435,7 @@
u->modified = 0;
m->userdata = u;
+ u->sink_input_hook_slot = u->source_output_hook_slot = NULL;
if (load_rules(u) < 0)
goto fail;
diff -urNad pulseaudio-0.9.5-7ubuntu1~/src/modules/rtp/sap.c pulseaudio-0.9.5-7ubuntu1/src/modules/rtp/sap.c
--- pulseaudio-0.9.5-7ubuntu1~/src/modules/rtp/sap.c 2007-05-08 06:39:32.000000000 -0400
+++ pulseaudio-0.9.5-7ubuntu1/src/modules/rtp/sap.c 2007-05-25 01:22:29.000000000 -0400
@@ -142,9 +142,6 @@
goto fail;
}
- if (!size)
- return 0;
-
buf = pa_xnew(char, size+1);
buf[size] = 0;
diff -urNad pulseaudio-0.9.5-7ubuntu1~/src/pulsecore/protocol-native.c pulseaudio-0.9.5-7ubuntu1/src/pulsecore/protocol-native.c
--- pulseaudio-0.9.5-7ubuntu1~/src/pulsecore/protocol-native.c 2007-05-08 06:39:33.000000000 -0400
+++ pulseaudio-0.9.5-7ubuntu1/src/pulsecore/protocol-native.c 2007-05-25 01:19:40.000000000 -0400
@@ -760,7 +760,8 @@
CHECK_VALIDITY(c->pstream, pa_cvolume_valid(&volume), tag, PA_ERR_INVALID);
CHECK_VALIDITY(c->pstream, map.channels == ss.channels && volume.channels == ss.channels, tag, PA_ERR_INVALID);
CHECK_VALIDITY(c->pstream, maxlength > 0 && maxlength <= MAX_MEMBLOCKQ_LENGTH, tag, PA_ERR_INVALID);
-
+ CHECK_VALIDITY(c->pstream, maxlength >= pa_frame_size(&ss), tag, PA_ERR_INVALID);
+
if (sink_index != PA_INVALID_INDEX) {
sink = pa_idxset_get_by_index(c->protocol->core->sinks, sink_index);
CHECK_VALIDITY(c->pstream, sink, tag, PA_ERR_NOENTITY);
diff -urNad pulseaudio-0.9.5-7ubuntu1~/src/pulsecore/pstream.c pulseaudio-0.9.5-7ubuntu1/src/pulsecore/pstream.c
--- pulseaudio-0.9.5-7ubuntu1~/src/pulsecore/pstream.c 2007-05-08 06:39:33.000000000 -0400
+++ pulseaudio-0.9.5-7ubuntu1/src/pulsecore/pstream.c 2007-05-25 01:18:45.000000000 -0400
@@ -585,7 +585,7 @@
flags = ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS]);
- if (!p->import && (flags & PA_FLAG_SHMMASK) != 0) {
+ if (!p->use_shm && (flags & PA_FLAG_SHMMASK) != 0) {
pa_log_warn("Recieved SHM frame on a socket where SHM is disabled.");
return -1;
}
@@ -615,7 +615,7 @@
length = ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]);
- if (length > FRAME_SIZE_MAX_ALLOW) {
+ if (length > FRAME_SIZE_MAX_ALLOW || length <= 0) {
pa_log_warn("Recieved invalid frame size : %lu", (unsigned long) length);
return -1;
}
diff -urNad pulseaudio-0.9.5-7ubuntu1~/src/pulsecore/sample-util.c pulseaudio-0.9.5-7ubuntu1/src/pulsecore/sample-util.c
--- pulseaudio-0.9.5-7ubuntu1~/src/pulsecore/sample-util.c 2007-05-25 01:15:11.000000000 -0400
+++ pulseaudio-0.9.5-7ubuntu1/src/pulsecore/sample-util.c 2007-05-25 01:20:30.000000000 -0400
@@ -35,13 +35,25 @@
#include "sample-util.h"
#include "endianmacros.h"
+#define PA_SILENCE_MAX (1024*1024*1)
+
pa_memblock *pa_silence_memblock_new(pa_mempool *pool, const pa_sample_spec *spec, size_t length) {
+ size_t fs;
assert(pool);
assert(spec);
if (length == 0)
length = pa_bytes_per_second(spec)/20; /* 50 ms */
+ if (length > PA_SILENCE_MAX)
+ length = PA_SILENCE_MAX;
+
+ fs = pa_frame_size(spec);
+ length = ((PA_SILENCE_MAX+fs-1) / fs) * fs;
+
+ if (length <= 0)
+ length = fs;
+
return pa_silence_memblock(pa_memblock_new(pool, length), spec);
}
++++++ pulseaudio-0.9.5-esd-max-samplesize.diff ++++++
Increase cache size of esd
diff -urNad pulseaudio-0.9.5~/src/pulsecore/protocol-esound.c pulseaudio-0.9.5/src/pulsecore/protocol-esound.c
--- pulseaudio-0.9.5~/src/pulsecore/protocol-esound.c 2006-08-20 01:06:45.000000000 +0200
+++ pulseaudio-0.9.5/src/pulsecore/protocol-esound.c 2007-03-06 14:13:17.000000000 +0100
@@ -68,7 +68,7 @@
#define RECORD_BUFFER_SECONDS (5)
#define RECORD_BUFFER_FRAGMENTS (100)
-#define MAX_CACHE_SAMPLE_SIZE (1024000)
+#define MAX_CACHE_SAMPLE_SIZE (2048000)
#define SCACHE_PREFIX "esound."
++++++ pulseaudio-0.9.5-firefox-workaround.diff ++++++
work around bug in firefox which apparently misuses access() as NULL
pointer test.
diff -urNad pulseaudio~/src/utils/padsp.c pulseaudio/src/utils/padsp.c
--- pulseaudio~/src/utils/padsp.c 2006-08-18 23:29:26.000000000 +0200
+++ pulseaudio/src/utils/padsp.c 2006-10-19 00:13:47.082198231 +0200
@@ -2121,6 +2121,13 @@
}
int access(const char *pathname, int mode) {
+
+ if (!pathname) {
+ /* Firefox needs this. See #27 */
+ errno = EFAULT;
+ return -1;
+ }
+
debug(DEBUG_LEVEL_VERBOSE, __FILE__": access(%s)\n", pathname);
if (strcmp(pathname, "/dev/dsp") != 0 &&
++++++ pulseaudio-0.9.5-javasound-support.diff ++++++
implement a few more ioctl()s, including a subset of
SNDCTL_DSP_GETOPTR. Just enough to make JavaSound work.
@DPATCH@
diff -urNad pulseaudio~/src/utils/padsp.c pulseaudio/src/utils/padsp.c
--- pulseaudio~/src/utils/padsp.c 2006-10-19 00:16:53.841869981 +0200
+++ pulseaudio/src/utils/padsp.c 2006-10-19 00:17:03.458470981 +0200
@@ -88,6 +88,8 @@
pa_cvolume sink_volume, source_volume;
uint32_t sink_index, source_index;
int volume_modify_count;
+
+ int optr_n_blocks;
PA_LLIST_FIELDS(fd_info);
};
@@ -574,6 +576,7 @@
i->volume_modify_count = 0;
i->sink_index = (uint32_t) -1;
i->source_index = (uint32_t) -1;
+ i->optr_n_blocks = 0;
PA_LLIST_INIT(fd_info, i);
reset_params(i);
@@ -1947,6 +1950,8 @@
free_streams(i);
dsp_flush_socket(i);
reset_params(i);
+
+ i->optr_n_blocks = 0;
pa_threaded_mainloop_unlock(i->mainloop);
break;
@@ -2035,14 +2040,76 @@
break;
}
+ case SOUND_PCM_READ_RATE:
+ debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_RATE\n");
+
+ pa_threaded_mainloop_lock(i->mainloop);
+ *(int*) argp = i->sample_spec.rate;
+ pa_threaded_mainloop_unlock(i->mainloop);
+ break;
+
+ case SOUND_PCM_READ_CHANNELS:
+ debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_CHANNELS\n");
+
+ pa_threaded_mainloop_lock(i->mainloop);
+ *(int*) argp = i->sample_spec.channels;
+ pa_threaded_mainloop_unlock(i->mainloop);
+ break;
+
+ case SOUND_PCM_READ_BITS:
+ debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_BITS\n");
+
+ pa_threaded_mainloop_lock(i->mainloop);
+ *(int*) argp = pa_sample_size(&i->sample_spec)*8;
+ pa_threaded_mainloop_unlock(i->mainloop);
+ break;
+
+ case SNDCTL_DSP_GETOPTR: {
+ count_info *info;
+
+ debug(DEBUG_LEVEL_NORMAL, __FILE__": SNDCTL_DSP_GETODELAY\n");
+
+ info = (count_info*) argp;
+ memset(info, 0, sizeof(*info));
+
+ pa_threaded_mainloop_lock(i->mainloop);
+
+ for (;;) {
+ pa_usec_t usec;
+
+ PLAYBACK_STREAM_CHECK_DEAD_GOTO(i, exit_loop);
+
+ if (pa_stream_get_time(i->play_stream, &usec) >= 0) {
+ size_t k = pa_usec_to_bytes(usec, &i->sample_spec);
+ int m;
+
+ info->bytes = (int) k;
+ m = k / i->fragment_size;
+ info->blocks = m - i->optr_n_blocks;
+ i->optr_n_blocks = m;
+
+ break;
+ }
+
+ if (pa_context_errno(i->context) != PA_ERR_NODATA) {
+ debug(DEBUG_LEVEL_NORMAL, __FILE__": pa_stream_get_latency(): %s\n", pa_strerror(pa_context_errno(i->context)));
+ break;
+ }
+
+ pa_threaded_mainloop_wait(i->mainloop);
+ }
+
+ pa_threaded_mainloop_unlock(i->mainloop);
+
+ debug(DEBUG_LEVEL_NORMAL, __FILE__": GETOPTR bytes=%i, blocks=%i, ptr=%i\n", info->bytes, info->blocks, info->ptr);
+
+ break;
+ }
+
case SNDCTL_DSP_GETIPTR:
debug(DEBUG_LEVEL_NORMAL, __FILE__": invalid ioctl SNDCTL_DSP_GETIPTR\n");
goto inval;
-
- case SNDCTL_DSP_GETOPTR:
- debug(DEBUG_LEVEL_NORMAL, __FILE__": invalid ioctl SNDCTL_DSP_GETOPTR\n");
- goto inval;
-
+
default:
debug(DEBUG_LEVEL_NORMAL, __FILE__": unknown ioctl 0x%08lx\n", request);
++++++ pulseaudio-0.9.5-wrong-endian-convert.diff ++++++
Fix float32le <-> float32ne <-> float32be sample converters
diff -urNad pulseaudio~/src/pulsecore/sample-util.c pulseaudio/src/pulsecore/sample-util.c
--- pulseaudio~/src/pulsecore/sample-util.c 2006-08-18 23:38:49.000000000 +0200
+++ pulseaudio/src/pulsecore/sample-util.c 2006-10-19 00:19:56.233268731 +0200
@@ -68,6 +68,7 @@
case PA_SAMPLE_S16LE:
case PA_SAMPLE_S16BE:
case PA_SAMPLE_FLOAT32:
+ case PA_SAMPLE_FLOAT32RE:
c = 0;
break;
case PA_SAMPLE_ALAW:
diff -urNad pulseaudio~/src/pulsecore/sconv.c pulseaudio/src/pulsecore/sconv.c
--- pulseaudio~/src/pulsecore/sconv.c 2006-08-18 23:29:25.000000000 +0200
+++ pulseaudio/src/pulsecore/sconv.c 2006-10-19 00:19:56.229268481 +0200
@@ -72,6 +72,22 @@
oil_memcpy(b, a, sizeof(float) * n);
}
+static void float32re_to_float32ne(unsigned n, const void *a, float *b) {
+ assert(a);
+ assert(b);
+
+ while (n-- > 0)
+ ((uint32_t *)b)[n] = UINT32_SWAP (((uint32_t *)a)[n]);
+}
+
+static void float32re_from_float32ne(unsigned n, const float *a, void *b) {
+ assert(a);
+ assert(b);
+
+ while (n-- > 0)
+ ((uint32_t *)b)[n] = UINT32_SWAP (((uint32_t *)a)[n]);
+}
+
static void ulaw_to_float32ne(unsigned n, const void *a, float *b) {
const uint8_t *ca = a;
@@ -140,6 +156,8 @@
return pa_sconv_s16be_to_float32ne;
case PA_SAMPLE_FLOAT32NE:
return float32ne_to_float32ne;
+ case PA_SAMPLE_FLOAT32RE:
+ return float32re_to_float32ne;
case PA_SAMPLE_ALAW:
return alaw_to_float32ne;
case PA_SAMPLE_ULAW:
@@ -159,6 +177,8 @@
return pa_sconv_s16be_from_float32ne;
case PA_SAMPLE_FLOAT32NE:
return float32ne_from_float32ne;
+ case PA_SAMPLE_FLOAT32RE:
+ return float32re_from_float32ne;
case PA_SAMPLE_ALAW:
return alaw_from_float32ne;
case PA_SAMPLE_ULAW:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package mysql
checked in at Wed May 30 01:16:13 CEST 2007.
--------
--- mysql/mysql.changes 2007-05-28 10:41:22.000000000 +0200
+++ /mounts/work_src_done/STABLE/mysql/mysql.changes 2007-05-29 13:12:06.901864000 +0200
@@ -1,0 +2,8 @@
+Tue May 29 12:58:35 CEST 2007 - mmarek(a)suse.de
+
+- run ldconfig in %%post of library packages
+- don't copy example my.cnf files to /usr/share/doc (they're
+ already installed in /usr/share/mysql
+- fixed libmysqlclient-devel dependencies
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mysql.spec ++++++
--- /var/tmp/diff_new_pack.Ix8148/_old 2007-05-30 01:15:46.000000000 +0200
+++ /var/tmp/diff_new_pack.Ix8148/_new 2007-05-30 01:15:46.000000000 +0200
@@ -15,7 +15,7 @@
License: GNU General Public License (GPL)
Group: Productivity/Databases/Servers
Version: 5.0.41
-Release: 1
+Release: 3
# required by rcmysql
Requires: mysql-client = %{version}
Autoreqprov: on
@@ -77,7 +77,7 @@
# mysql-devel was last used in openSUSE 10.2
Provides: mysql-devel = %{version}-%{release}
Obsoletes: mysql-devel <= 5.0.26
-Requires: libmysqlclient = %{version} libmysqlclient_r = %{version} glibc-devel zlib-devel openssl-devel
+Requires: libmysqlclient15 = %{version} libmysqlclient_r15 = %{version} glibc-devel zlib-devel openssl-devel
License: GNU General Public License (GPL)
Summary: MySQL Development Header Files and Libraries
URL: http://www.mysql.com
@@ -413,7 +413,7 @@
# Create directory structure
DOCS=(COPYING README EXCEPTIONS-CLIENT %_sourcedir/README.{SUSE,debug})
DOCDIR=$RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}
-install -d -m 755 ${DOCDIR}/cnf
+install -d -m 755 ${DOCDIR}
install -d -m 755 $RPM_BUILD_ROOT/etc/logrotate.d
install -d -m 755 $RPM_BUILD_ROOT/etc/init.d
install -d -m 755 $RPM_BUILD_ROOT/var/lib/mysql
@@ -421,7 +421,6 @@
install -m 660 _build/support-files/my-medium.cnf $RPM_BUILD_ROOT/etc/my.cnf
install -m 640 scripts/mysqlaccess.conf $RPM_BUILD_ROOT/etc/mysqlaccess.conf
install -m 644 "${DOCS[@]}" ${DOCDIR}
-install -m 644 _build/support-files/my-*.cnf ${DOCDIR}/cnf
install -m 755 %_sourcedir/rc.mysql $RPM_BUILD_ROOT/etc/init.d/mysql
ln -sf ../../etc/init.d/mysql $RPM_BUILD_ROOT/usr/sbin/rcmysql
install -m 755 -d $RPM_BUILD_ROOT/var/lib/mysql/.tmp
@@ -475,6 +474,10 @@
%post Max
touch /var/lib/mysql/.run-mysql_upgrade
+%post -n libmysqlclient15 -p /sbin/ldconfig
+
+%post -n libmysqlclient_r15 -p /sbin/ldconfig
+
%preun
%stop_on_removal mysql
@@ -550,6 +553,11 @@
%files tools -f mysql-tools.files
%changelog
+* Tue May 29 2007 - mmarek(a)suse.de
+- run ldconfig in %%post of library packages
+- don't copy example my.cnf files to /usr/share/doc (they're
+ already installed in /usr/share/mysql
+- fixed libmysqlclient-devel dependencies
* Mon May 28 2007 - mmarek(a)suse.cz
- updated to 5.0.41, for changes see
http://dev.mysql.com/doc/refman/5.0/en/releasenotes-cs-5-0-37.html
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package NX
checked in at Wed May 30 01:15:57 CEST 2007.
--------
--- NX/NX.changes 2007-05-02 12:16:00.000000000 +0200
+++ /mounts/work_src_done/STABLE/NX/NX.changes 2007-05-29 15:24:32.717750000 +0200
@@ -1,0 +2,5 @@
+Tue May 29 15:24:28 CEST 2007 - sndirsch(a)suse.de
+
+- added "%post -p /sbin/ldconfig" to specfile to make rpmlint happy
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ NX.spec ++++++
--- /var/tmp/diff_new_pack.mb8623/_old 2007-05-30 01:15:48.000000000 +0200
+++ /var/tmp/diff_new_pack.mb8623/_new 2007-05-30 01:15:48.000000000 +0200
@@ -25,7 +25,7 @@
URL: http://www.nomachine.com/sources.php
Group: System/X11/Servers/XF86_4
Version: 2.1.0
-Release: 3
+Release: 9
Summary: Proxy System for X11
#Compression Libraries and Proxy Sources
Source: nxproxy-%{version}-3.tar.gz
@@ -225,6 +225,8 @@
rm -f %{my_provides}
rm -f %{my_requires}
+%post -p /sbin/ldconfig
+
%files
%defattr(-,root,root)
%doc /usr/share/doc/packages/NX
@@ -249,6 +251,8 @@
/usr/share/NX/keymaps-windows/
%changelog
+* Tue May 29 2007 - sndirsch(a)suse.de
+- added "%%post -p /sbin/ldconfig" to specfile to make rpmlint happy
* Wed May 02 2007 - sndirsch(a)suse.de
- fixed run-nxagent-client in samples script (-nolimit option for
nxagent no longer available)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package mkinitrd
checked in at Wed May 30 01:15:41 CEST 2007.
--------
--- mkinitrd/mkinitrd.changes 2007-05-24 10:14:38.000000000 +0200
+++ /mounts/work_src_done/STABLE/mkinitrd/mkinitrd.changes 2007-05-29 17:33:35.055676000 +0200
@@ -1,0 +2,7 @@
+Tue May 29 17:33:51 CEST 2007 - agraf(a)suse.de
+
+- Include optional busybox support (activate with -f busybox)
+ (#276555)
+- Suppress useless warnings in resume features
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mkinitrd.spec ++++++
--- /var/tmp/diff_new_pack.Bu1777/_old 2007-05-30 01:15:10.000000000 +0200
+++ /var/tmp/diff_new_pack.Bu1777/_new 2007-05-30 01:15:10.000000000 +0200
@@ -18,7 +18,7 @@
Requires: coreutils modutils util-linux grep gzip sed gawk cpio udev pciutils sysvinit file
Autoreqprov: on
Version: 2.0
-Release: 9
+Release: 12
Summary: Creates an Initial RAM Disk Image for Preloading Modules
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: mkinitrd.tgz
@@ -92,6 +92,10 @@
%doc %{_mandir}/man8/mkinitrd.8.gz
%changelog
+* Tue May 29 2007 - agraf(a)suse.de
+- Include optional busybox support (activate with -f busybox)
+ (#276555)
+- Suppress useless warnings in resume features
* Thu May 24 2007 - agraf(a)suse.de
- Resolve persistent device names for non-root-devices
- Split resume into userspace and kernel resume
++++++ mkinitrd.tgz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.0/lib/mkinitrd/boot/18-resume.userspace.sh new/mkinitrd-2.0/lib/mkinitrd/boot/18-resume.userspace.sh
--- old/mkinitrd-2.0/lib/mkinitrd/boot/18-resume.userspace.sh 2007-05-23 15:23:40.000000000 +0200
+++ new/mkinitrd-2.0/lib/mkinitrd/boot/18-resume.userspace.sh 2007-05-29 17:24:11.000000000 +0200
@@ -15,7 +15,7 @@
## resume the device to resume from
##
-[ "$(set -u; $noresume && echo 1)" = "1" ] && resume_mode=off
+[ "$( ( set -u; echo $noresume >/dev/null; echo 1 ) 2>/dev/null )" = "1" ] && resume_mode=off
# Verify manual resume mode
if [ "$resume_mode" != "off" -a -n "$resumedev" ]; then
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.0/lib/mkinitrd/boot/19-resume.kernel.sh new/mkinitrd-2.0/lib/mkinitrd/boot/19-resume.kernel.sh
--- old/mkinitrd-2.0/lib/mkinitrd/boot/19-resume.kernel.sh 2007-05-23 15:25:18.000000000 +0200
+++ new/mkinitrd-2.0/lib/mkinitrd/boot/19-resume.kernel.sh 2007-05-29 17:24:21.000000000 +0200
@@ -14,7 +14,7 @@
## resume the device to resume from
##
-[ "$(set -u; $noresume && echo 1)" = "1" ] && resume_mode=off
+[ "$( ( set -u; echo $noresume >/dev/null; echo 1 ) 2>/dev/null )" = "1" ] && resume_mode=off
# Verify manual resume mode
if [ "$resume_mode" != "off" -a -n "$resumedev" ]; then
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.0/lib/mkinitrd/boot/52-busybox.sh new/mkinitrd-2.0/lib/mkinitrd/boot/52-busybox.sh
--- old/mkinitrd-2.0/lib/mkinitrd/boot/52-busybox.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/mkinitrd-2.0/lib/mkinitrd/boot/52-busybox.sh 2007-05-25 13:33:48.000000000 +0200
@@ -0,0 +1,5 @@
+#!/bin/bash
+#%if: 1 = 2
+#%programs: busybox
+
+## this is only a dummy script so we see busybox as a feature in the list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mkinitrd-2.0/lib/mkinitrd/setup/52-busybox.sh new/mkinitrd-2.0/lib/mkinitrd/setup/52-busybox.sh
--- old/mkinitrd-2.0/lib/mkinitrd/setup/52-busybox.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/mkinitrd-2.0/lib/mkinitrd/setup/52-busybox.sh 2007-05-29 17:29:03.000000000 +0200
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+if use_script busybox; then
+ if [ ! -x "/usr/bin/busybox" ]; then
+ echo "[BUSYBOX] No Busybox executable was found"
+ else
+ for i in `busybox | grep Curr -A 200 | grep -v "Currently defined f"`; do
+ DIR=bin
+ busyfile="${i/,/}"
+ # skip programs that do not work properly
+ case $busyfile in
+ modprobe|fsck|umount|mount)
+ continue
+ ;;
+ esac
+ if [ -e "bin/$busyfile" ]; then
+ verbose "[BUSYBOX] replacing $DIR/$busyfile"
+ rm -f bin/$busyfile
+ elif [ -e "sbin/$busyfile" ]; then
+ DIR=sbin
+ rm -f sbin/$busyfile
+ verbose "[BUSYBOX] replacing $DIR/$busyfile"
+ fi
+ ln -s ../bin/busybox "$DIR/$busyfile"
+ done
+ fi
+fi
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package mingetty
checked in at Wed May 30 01:15:28 CEST 2007.
--------
--- mingetty/mingetty.changes 2006-05-24 17:16:46.000000000 +0200
+++ /mounts/work_src_done/STABLE/mingetty/mingetty.changes 2007-05-29 17:26:14.174970000 +0200
@@ -1,0 +2,6 @@
+Tue May 29 16:55:52 CEST 2007 - werner(a)suse.de
+
+- Adopt autologin and other new feature of the other mingetty
+ at sourceforge.
+
+-------------------------------------------------------------------
Old:
----
mingetty-0.9.6s.dif
mingetty-0.9.6s.tar.bz2
New:
----
mingetty-1.0.7s.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mingetty.spec ++++++
--- /var/tmp/diff_new_pack.r32719/_old 2007-05-30 01:14:57.000000000 +0200
+++ /var/tmp/diff_new_pack.r32719/_new 2007-05-30 01:14:57.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package mingetty (Version 0.9.6s)
+# spec file for package mingetty (Version 1.0.7s)
#
-# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -11,16 +11,16 @@
# norootforbuild
Name: mingetty
-License: GPL
+License: GNU General Public License (GPL)
Group: System/Base
Autoreqprov: on
-Version: 0.9.6s
-Release: 88
+Version: 1.0.7s
+Release: 1
Summary: Minimal Getty for Virtual Consoles Only
Provides: sysvinit:/sbin/mingetty
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: mingetty-0.9.6s.tar.bz2
-Patch: mingetty-0.9.6s.dif
+Source: mingetty-1.0.7s.tar.bz2
+#Patch: mingetty-1.0.7s.dif
%description
The mingetty program is a lightweight, minimalist getty program for use
@@ -37,10 +37,15 @@
%prep
%setup -q
-%patch
+#%patch
%build
-make RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -D_FILE_OFFSET_BITS=64" DEFTERM=linux
+%ifarch s390 s390x
+DEFTERM=dump
+%else
+DEFTERM=linux
+%endif
+make RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -D_FILE_OFFSET_BITS=64" DEFTERM=${DEFTERM}
%install
mkdir -p ${RPM_BUILD_ROOT}{/sbin,%{_mandir}/man8}
@@ -51,7 +56,10 @@
/sbin/mingetty
%doc %{_mandir}/man8/mingetty.8.gz
-%changelog -n mingetty
+%changelog
+* Tue May 29 2007 - werner(a)suse.de
+- Adopt autologin and other new feature of the other mingetty
+ at sourceforge.
* Wed May 24 2006 - schwab(a)suse.de
- Don't strip binaries.
* Wed Jan 25 2006 - mls(a)suse.de
++++++ mingetty-0.9.6s.tar.bz2 -> mingetty-1.0.7s.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mingetty-0.9.6s/CHANGES new/mingetty-1.0.7s/CHANGES
--- old/mingetty-0.9.6s/CHANGES 2002-11-13 18:14:17.000000000 +0100
+++ new/mingetty-1.0.7s/CHANGES 2007-05-29 17:23:36.000000000 +0200
@@ -30,3 +30,12 @@
Add an old option for avoiding vcs/vcsa hangup, terminal
reset, and the usage of the glibc for updating wtmp.
Cleanup the source and the manual page.
+
+* 04/03/30, Werner Fink <werner(a)suse.de>
+ More about UTF-8: enable the kernel to erease UTF-8 multi byte
+ characters. Therefore add workaround if glibc bits/termios.h
+ is missing the IUTF8 input flag.
+
+* 07/05/29, Werner Fink <werner(a)suse.de>
+ Adopt autologin and other new feature of the other mingetty
+ at sourceforge.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mingetty-0.9.6s/Makefile new/mingetty-1.0.7s/Makefile
--- old/mingetty-0.9.6s/Makefile 2002-11-14 13:29:44.000000000 +0100
+++ new/mingetty-1.0.7s/Makefile 2007-05-29 16:49:01.000000000 +0200
@@ -2,23 +2,27 @@
#
#
DEFTERM = linux
-VERSION = mingetty-0.9.6s
+VERSION = mingetty-1.0.7s
#
DEFINES = -DRESET_TTY=1 -DDEFAULT_TERM=\"$(DEFTERM)\" -DVERSION=\"$(VERSION)\"
-CFLAGS = -Wall -O2 -pipe -D_GNU_SOURCE -D_BSD_SOURCE $(DEFINES)
+CFLAGS = -Wall $(RPM_OPT_FLAGS) -pipe -D_GNU_SOURCE -D_BSD_SOURCE $(DEFINES)
#
-LDFLAGS = -Wl,-warn-common -s
+LDFLAGS = -Wl,-warn-common
CC = gcc
+DESTDIR =
+MANDIR = /usr/share/man
+SBINDIR = /sbin
+
all: mingetty
size mingetty
install: all
- install -s mingetty /sbin/
- install -m 644 mingetty.8 /usr/share/man/man8/
+ install mingetty $(DESTDIR)$(SBINDIR)
+ install -m 644 mingetty.8 $(DESTDIR)$(MANDIR)/man8/
-mingetty: mingetty.o sigfholder.o
-mingetty.o: mingetty.c
+mingetty: mingetty.o revoke.o
+mingetty.o: mingetty.c revoke.c revoke.h
clean:
rm -f *.o mingetty
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mingetty-0.9.6s/mingetty.8 new/mingetty-1.0.7s/mingetty.8
--- old/mingetty-0.9.6s/mingetty.8 2002-11-13 18:05:22.000000000 +0100
+++ new/mingetty-1.0.7s/mingetty.8 2007-05-29 17:14:24.000000000 +0200
@@ -1,12 +1,24 @@
.\"
-.TH MINGETTY 8 "12 June 1999" "SuSE" "Linux Programmer's Manual"
+.TH MINGETTY 8 "29 May 2007" "SuSE" "Linux Programmer's Manual"
.SH NAME
mingetty \- minimal getty for consoles
.SH SYNOPSIS
.B /sbin/mingetty
-.RB [ \-\-noclear ]\ [ \-\-noreset ]\ [ \-\-long\-hostname ]
-.RB [ \-\-no-hostname ]\ [ \-\-login\ \fIlogin_binary\fP ]\ [ \-\-old ]
+.RB [ \-\-noclear ]
+.RB [ \-\-nonewline ]
+.RB [ \-\-noissue ]
+.RB [ \-\-nohangup ]
+.RB [ \-\-noreset ]
+.RB [ \-\-no\-hostname ]
+.RB [ \-\-long-hostname ]
+.RB [ \-\-login\ \fIlogin_binary\fP ]
.RB [ \-\-logopts\ \fI"login_options"\fP ]
+.RB [ \-\-nice\ \fInumber\fP ]
+.RB [ \-\-delay\ \fInumber\fP ]
+.RB [ \-\-chdir\ \fI/home\fP ]
+.RB [ \-\-chroot\ \fI/chroot\fP ]
+.RB [ \-\-autologin\ \fIuser\fP ]
+.RB [ \-\-old ]
.I tty
.RI [ term ]
.PP
@@ -17,7 +29,7 @@
.BR agetty (8),
.B mingetty
is not suitable for serial lines.
-For this purpose the usage
+For this purpose the usage of
.BR mgetty (8)
is recommend.
.PP
@@ -32,14 +44,24 @@
sane default values. With this option the terminal settings
will not be changed.
.TP
-.B \-\-long\-hostname
-By default the hostname is only printed until the first dot.
-With this option enabled, the full text from gethostname() is shown.
+.B \-\-nonewline
+Do not print a newline before writing out /etc/issue.
+.TP
+.B \-\-noissue
+Do not output /etc/issue.
+.TP
+.B \-\-nohangup
+Do not call vhangup() to disable writing to this tty by
+other applications.
.TP
.B \-\-no\-hostname
By default the hostname will be printed.
With this option enabled, no hostname at all will be shown.
.TP
+.B \-\-long\-hostname
+By default the hostname is only printed until the first dot.
+With this option enabled, the full text from gethostname() is shown.
+.TP
.B \-\-login \fIlogin_binary\fP
Use the \fIlogin_binary\fP to log in instead of the default
.IR /bin/login .
@@ -52,6 +74,24 @@
.IR /bin/login .
Please read the SECURITY NOTICE below if you want to use this.
.TP
+.B \-\-nice 10
+Change the priority by calling nice().
+.TP
+.B \-\-delay 5
+Sleep this many seconds after startup of mingetty.
+.TP
+.B \-\-chdir /home
+Change into this directory before calling the login prog.
+.TP
+.B \-\-chroot /chroot
+Call chroot() with this directory name.
+.TP
+.B \-\-autologin username
+Log the specified user automatically in without asking for
+a login name and password. Check the \-f option from
+.B /bin/login
+for this.
+.TP
.B \-\-old
Do not reset the terminal line to standard settings and
do not hangup the
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mingetty-0.9.6s/mingetty.c new/mingetty-1.0.7s/mingetty.c
--- old/mingetty-0.9.6s/mingetty.c 2002-11-14 13:32:03.000000000 +0100
+++ new/mingetty-1.0.7s/mingetty.c 2007-05-29 17:06:50.000000000 +0200
@@ -65,78 +65,59 @@
* Add an old option for avoiding vcs/vcsa hangup, terminal
* reset, and the usage of the glibc for updating wtmp.
* Cleanup the source and the manual page.
+ *
+ * Tue Mar 30 13:53:48 CEST 2004 - werner(a)suse.de
+ * More about UTF-8: enable the kernel to erease UTF-8 multi byte
+ * characters. Therefore add workaround if glibc bits/termios.h
+ * is missing the IUTF8 input flag.
+ *
+ * Tue May 29 16:55:52 CEST 2007 - Werner Fink <werner(a)suse.de>
+ * Adopt autologin and other new feature of the other mingetty
+ * at sourceforge.
*/
#ifndef VERSION
-# define VERSION "mingetty-0.9.6s"
+# define VERSION "mingetty-1.0.7s"
#endif
#ifndef DEFAULT_TERM
# define DEFAULT_TERM "linux"
#endif
-#ifndef DEBUG_THIS
-# define DEBUG_THIS 0
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <sys/syscall.h>
-extern int sigfholder(const char *path, int sig);
+#include <termios.h>
#include <string.h>
-#include <grp.h>
#include <sys/ioctl.h>
#include <errno.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
-#if defined __GLIBC__ && __GLIBC__ >= 2
-# include <signal.h>
-#else
-# include <sys/signal.h>
-#endif
+#include <signal.h>
#include <fcntl.h>
#include <stdarg.h>
#include <ctype.h>
#include <utmp.h>
#include <getopt.h>
-
-#ifdef RESET_TTY
-# if defined __GLIBC__ && __GLIBC__ >= 2
-# include <termios.h>
-# else
-# include <sys/termios.h>
-# endif
-# include <sys/ttydefaults.h>
-#endif
-
-#if defined(_BSD_SOURCE)
-# define strerror(errno) sys_errlist[(errno)]
-#else
-# define strerror(errno) strerror((errno))
-#endif
-
-#ifdef linux
#include <sys/param.h>
-#define USE_SYSLOG
-#endif
+#include <syslog.h>
+#include <sys/utsname.h>
+#include <time.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+#include <grp.h>
+#include <locale.h>
+#include <iconv.h>
+#include <wctype.h>
+#include <sys/kd.h>
+#include "revoke.h"
- /* If USE_SYSLOG is undefined all diagnostics go directly to /dev/console. */
-#ifdef USE_SYSLOG
-# if defined __GLIBC__ && __GLIBC__ >= 2
-# include <sys/syslog.h>
-# else
-# include <syslog.h>
-# endif
+#ifndef IUTF8
+# error IUTF8 input flag not defined
#endif
#define ISSUE "/etc/issue" /* displayed before the login prompt */
-#include <sys/utsname.h>
-#include <time.h>
-
#define LOGIN "login: " /* login prompt */
-
#ifndef _PATH_LOGIN
#define _PATH_LOGIN "/bin/login"
#endif
@@ -150,58 +131,54 @@
static struct utsname uts;
/* the hostname */
static char hn[MAXHOSTNAMELEN + 1];
-/* process ID of this program */
-static pid_t pid;
-/* session ID of this program */
-static pid_t sid;
-/* current time */
-static time_t cur_time;
-/* do not send a reset string to the terminal ? */
+/* process and session ID of this program */
+static pid_t pid, sid;
+/* login program invoked */
+static char *loginprog = _PATH_LOGIN;
+/* Do not send a reset string to the terminal. */
static int noclear = 0;
+/* Do not print a newline. */
+static int nonewline = 0;
+/* Do not print /etc/issue. */
+static int noissue = 0;
+/* Do not call vhangup() on the tty. */
+static int nohangup = 0;
+/* Do not print any hostname. */
+static int nohostname = 0;
/* Print the whole string of gethostname() instead of just until the next "." */
static int longhostname = 0;
-/* Do not print the hostname at all */
-static int nohostname = 0;
+/* time to wait, seconds */
+static int delay = 0;
+/* chroot directory */
+static char *ch_root = NULL;
+/* working directory to change into */
+static char *ch_dir = NULL;
+/* 'nice' level of the program */
+static int priority = 0;
+/* automatic login with this user */
+static char *autologin = NULL;
/* do not reset the terminal ? */
static int noreset = 0;
-/* login program */
-static char* loginprog;
-/* use old behaviour */
+/* current time */
static int old = 0;
+/* current time */
+static int mode = K_RAW;
/*
* output warn/error messages
*/
static void _vlogger (int priority, const char *fmt, va_list va_alist)
{
- char buf[256], *bp;
-#ifndef USE_SYSLOG
- int fd;
-#endif
+ char buf[256] = {'\0'}, *bp = &buf[0];
-#ifdef USE_SYSLOG
- buf[0] = '\0';
- bp = buf;
-#else
strncpy (buf, progname, sizeof(buf) - 4);
buf[sizeof(buf) - 5] = '\0';
strcat (buf, ": ");
bp = buf + strlen (buf);
-#endif
-
vsnprintf (bp, sizeof(buf)-strlen(buf), fmt, va_alist);
-
-#ifdef USE_SYSLOG
openlog (progname, LOG_PID, LOG_AUTH);
syslog (priority, "%s", buf);
closelog ();
-#else
- strcat (bp, "\r\n");
- if ((fd = open ("/dev/console", 1)) >= 0) {
- write (fd, buf, strlen (buf));
- close (fd);
- }
-#endif
}
/*
@@ -240,14 +217,6 @@
return;
}
-/*
- * cry if wtmp can not be locked
- */
-static void sigalrm_handler(int signum)
-{
- alert("Lock failed on wtmp");
-}
-
static void sigquit_handler (int signum) {
struct sigaction act;
sigset_t set;
@@ -269,128 +238,6 @@
abort();
}
-#ifdef linux
-/*
- *
- */
-static void vcshangup(const gid_t gid)
-{
- struct stat st;
- char buf[PATH_MAX+1];
-
- if (!vcline)
- goto skip;
-
- /* Set up new virtual console text capture devices */
- strncpy (buf, "/dev/vcs", PATH_MAX);
- strncat (buf, vcline, PATH_MAX - strlen(buf));
-
- if (stat(buf, &st) < 0) {
- if (errno != ENOENT)
- error ("%s: %s", buf, strerror(errno));
- goto skip;
- }
- if (chown (buf, 0, gid) || chmod (buf, (gid ? 0660 : 0600))) {
- if (errno == EROFS)
- warn("%s: %s", buf, strerror(errno));
- else
- error ("%s: %s", buf, strerror(errno));
- }
-# ifdef __NR_revoke
- _syscall(int, revoke, const char*, buf);
-# else
- if (sigfholder(buf, SIGHUP)) { /* Be nice, send SIGHUP */
- sleep (2);
- if (sigfholder(buf, SIGKILL)) /* Hey, go away */
- sigfholder(buf, SIGCONT);
- }
-# endif /* __NR_revoke */
-
- /* Set up new virtual console text/attribute capture devices */
- strncpy (buf, "/dev/vcsa", PATH_MAX);
- strncat (buf, vcline, PATH_MAX - strlen(buf));
-
- if (stat(buf, &st) < 0) {
- if (errno != ENOENT)
- error ("%s: %s", buf, strerror(errno));
- goto skip;
- }
- if (chown (buf, 0, gid) || chmod (buf, (gid ? 0660 : 0600))) {
- if (errno == EROFS)
- warn("%s: %s", buf, strerror(errno));
- else
- error ("%s: %s", buf, strerror(errno));
- }
-# ifdef __NR_revoke
- _syscall(int, revoke, const char*, buf);
-# else
- if (sigfholder(buf, SIGHUP)) { /* Be nice, send SIGHUP */
- sleep (2);
- if (sigfholder(buf, SIGKILL)) /* Hey, go away */
- sigfholder(buf, SIGCONT);
- }
-# endif /* __NR_revoke */
-skip:
- return;
-}
-
-# ifdef RESET_TTY
-static void reset_stdin()
-{
- struct termios termios;
- /* The above reset only puts the output things into a sane state.
- * The input state is not reset.
- */
- memset (&termios, 0, sizeof termios);
- if (tcgetattr (0, &termios))
- warn ("tcgetattr problem: %s", strerror(errno));
-
- /* Use defaults of <sys/ttydefaults.h> for base settings */
- termios.c_iflag |= TTYDEF_IFLAG;
- termios.c_oflag |= TTYDEF_OFLAG;
- termios.c_lflag |= TTYDEF_LFLAG;
- termios.c_cflag |= (TTYDEF_SPEED | TTYDEF_CFLAG);
-
- /* Sane setting, allow eight bit characters, no carriage return delay
- * the same result as `stty sane cr0 pass8'
- */
- termios.c_iflag |= (BRKINT | ICRNL | IMAXBEL);
- termios.c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IUCLC | IXANY | ISTRIP);
- termios.c_oflag |= (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0);
- termios.c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | OFDEL |\
- NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY);
- termios.c_lflag |= (ISIG | ICANON | IEXTEN | ECHO|ECHOE|ECHOK|ECHOCTL|ECHOKE);
- termios.c_lflag &= ~(ECHONL | NOFLSH | XCASE | TOSTOP | ECHOPRT);
- termios.c_cflag |= (CREAD | CS8 | B38400);
- termios.c_cflag &= ~(PARENB);
-
- /* VTIME and VMIN can overlap with VEOF and VEOL since they are
- * only used for non-canonical mode. We just set the at the
- * beginning, so nothing bad should happen.
- */
- termios.c_cc[VTIME] = 0;
- termios.c_cc[VMIN] = 1;
- termios.c_cc[VINTR] = CINTR;
- termios.c_cc[VQUIT] = CQUIT;
- termios.c_cc[VERASE] = CERASE; /* ASCII DEL (0177) */
- termios.c_cc[VKILL] = CKILL;
- termios.c_cc[VEOF] = CEOF;
- termios.c_cc[VSWTC] = _POSIX_VDISABLE;
- termios.c_cc[VSTART] = CSTART;
- termios.c_cc[VSTOP] = CSTOP;
- termios.c_cc[VSUSP] = CSUSP;
- termios.c_cc[VEOL] = _POSIX_VDISABLE;
- termios.c_cc[VREPRINT] = CREPRINT;
- termios.c_cc[VDISCARD] = CDISCARD;
- termios.c_cc[VWERASE] = CWERASE;
- termios.c_cc[VLNEXT] = CLNEXT;
- termios.c_cc[VEOL2] = _POSIX_VDISABLE;
- if (tcsetattr (0, TCSADRAIN, &termios))
- warn ("tcsetattr problem: %s", strerror(errno));
-}
-# endif /* RESET_TTY */
-#endif /* linux */
-
/*
* update_utmp - update our utmp entry
*
@@ -404,8 +251,8 @@
static void update_utmp (void)
{
struct utmp ut;
- int ut_fd;
struct utmp *utp;
+ time_t cur_time;
utmpname (_PATH_UTMP);
setutent ();
@@ -417,7 +264,6 @@
memcpy (&ut, utp, sizeof (ut));
} else {
/* some inits don't initialize utmp... */
- /* XXX we should print out a warning message */
memset (&ut, 0, sizeof (ut));
if (vcline)
/* Standard virtual console devices */
@@ -432,55 +278,42 @@
strncpy (ut.ut_id, ptr, sizeof (ut.ut_id));
}
}
- endutent ();
strncpy (ut.ut_user, "LOGIN", sizeof (ut.ut_user));
strncpy (ut.ut_line, tty, sizeof (ut.ut_line));
+
+ time (&cur_time);
ut.ut_time = cur_time;
ut.ut_type = LOGIN_PROCESS;
ut.ut_pid = pid;
ut.ut_session = sid;
- setutent ();
pututline (&ut);
endutent ();
- if (!old) {
- /* Default case: Use glibc for updating /var/log/wtmp */
- updwtmp(_PATH_WTMP, &ut);
-
- } else if ((ut_fd = open (_PATH_WTMP, O_APPEND | O_WRONLY)) >= 0) {
- /* Old behaviour */
- (void)signal(SIGALRM, sigalrm_handler);
- (void)alarm(3);
- flock (ut_fd, LOCK_EX);
- (void)alarm(0);
- (void)signal(SIGALRM, SIG_DFL);
- write (ut_fd, &ut, sizeof (ut));
- flock (ut_fd, LOCK_UN);
- close (ut_fd);
- }
+ updwtmp (_PATH_WTMP, &ut);
}
/* open_tty - set up tty as standard { input, output, error } */
static void open_tty (void)
{
- struct sigaction sa;
+ struct sigaction sa, sa_old;
sigset_t set;
- /* Was `char buf[20];' but there is more than /dev/tty<number> */
char buf[PATH_MAX+1];
- int fd;
+ int fd, len;
gid_t gid = 0;
struct group *gr = NULL;
- /* Use tty group is available */
+ /* Use tty group if available */
if ((gr = getgrnam("tty")))
gid = gr->gr_gid;
/* Set up new standard input. */
- if (snprintf(buf, sizeof(buf), "/dev/%s", tty) < 0) {
+ if (((len = snprintf(buf, sizeof(buf), "/dev/%s", tty)) >= sizeof(buf)) || (len < 0))
error ("%s: %s", buf, strerror(EOVERFLOW));
- }
+
+ /* There is always a race between this reset and the call to
+ vhangup() that s.o. can use to get access to your tty. */
if (chown (buf, 0, gid) || chmod (buf, (gid ? 0660 : 0600))) {
if (errno == EROFS)
warn("%s: %s", buf, strerror(errno));
@@ -491,29 +324,31 @@
sa.sa_handler = SIG_IGN;
sa.sa_flags = 0;
sigemptyset (&sa.sa_mask);
- sigaction (SIGHUP, &sa, NULL);
+ sigaction (SIGHUP, &sa, &sa_old);
sa.sa_handler = sigquit_handler;
sigaction (SIGQUIT, &sa, NULL);
- /* vhangup() will replace all open file descriptors that point to our
- controlling tty by a dummy that will deny further reading/writing
- to our device. It will also reset the tty to sane defaults, so we
- don't have to modify the tty device for sane settings.
- We also get a SIGHUP/SIGCONT.
+ /* vhangup() will replace all open file descriptors in the kernel
+ that point to our controlling tty by a dummy that will deny
+ further reading/writing to our device. It will also reset the
+ tty to sane defaults, so we don't have to modify the tty device
+ for sane settings. We also get a SIGHUP/SIGCONT.
*/
if ((fd = open (buf, O_RDWR, 0)) < 0)
error ("%s: cannot open tty: %s", buf, strerror(errno));
if (!isatty (fd))
error ("%s: not a tty", buf);
- if (vhangup ())
- error ("vhangup() failed");
- /* Get rid of the present stdout/stderr. */
- close (2);
- close (1);
- close (0);
- if (fd > 2)
- close (fd);
+ if (nohangup == 0) {
+ if (vhangup ())
+ error ("%s: vhangup() failed", tty);
+ /* Get rid of the present stdout/stderr. */
+ close (2);
+ close (1);
+ close (0);
+ if (fd > 2)
+ close (fd);
+ }
if ((fd = open (buf, O_RDWR, 0)) < 0)
error ("%s: cannot open tty: %s", buf, strerror(errno));
@@ -532,42 +367,43 @@
if (fd > 2)
close (fd);
+#ifdef IUTF8
+ /* Detect mode of current keyboard setup, e.g. for UTF-8 */
+ if (ioctl(0, KDGKBMODE, &mode) < 0)
+ mode = K_RAW;
+#endif
+
/* Write a reset string to the terminal. This is very linux-specific
and should be checked for other systems. */
- if (!noclear)
- write (0, "\033c", 2);
+ if (noclear == 0)
+ /* don't write a full reset (ESC c) because this leaves the
+ unicode mode again if the terminal was in unicode mode
+ and also undos the ESC sequences in CONSOLE_MAGIC which
+ are needed for some languages/console-fonts.
+ Just put the cursor to the home position (ESC [ H),
+ erase everything below the cursor (ESC [ J), and set the
+ scrolling region to the full window (ESC [ r) */
+ write (0, "\033[r\033[H\033[J", 9);
-#ifdef linux
/*
* Only for the standard virtual console devices
*/
if (!old && vcline)
- vcshangup(gid);
-#endif
+ vcshangup(gid, vcline);
-#ifdef RESET_TTY
/*
* The above reset only puts the output things into a sane state.
* The input state is not reset.
*/
if (!noreset && !old)
- reset_stdin();
-#endif
+ reset_stdin(mode);
- sa.sa_handler = SIG_DFL;
- sa.sa_flags = 0;
- sigemptyset (&sa.sa_mask);
- sigaction (SIGHUP, &sa, NULL);
+ sigaction (SIGHUP, &sa_old, NULL);
/* Unmask SIGHUP if inherited */
sigemptyset (&set);
sigaddset (&set, SIGHUP);
sigprocmask (SIG_UNBLOCK, &set, NULL);
-
-#if DEBUG_THIS
- printf ("session=%d, pid=%d, pgid=%d\n", getsid (0), getpid (),
- getpgid (0));
-#endif
}
static void output_special_char (unsigned char c)
@@ -589,27 +425,22 @@
printf ("%s", uts.machine);
break;
case 'o':
-#ifdef __USE_GNU
printf ("%s", uts.domainname);
-#else
- printf ("%s", uts.__domainname);
-#endif
break;
case 'd':
case 't':
{
- time_t now;
+ time_t cur_time;
struct tm *tm;
- time (&now);
- tm = localtime (&now);
- if (c == 'd')
- /* ISO 8601 */
+ time (&cur_time);
+ tm = localtime (&cur_time);
+ if (c == 'd') /* ISO 8601 */
printf ("%d-%02d-%02d", 1900 + tm->tm_year,
- tm->tm_mon+1, tm->tm_mday);
- else
- printf ("%02d:%02d:%02d",
- tm->tm_hour, tm->tm_min, tm->tm_sec);
+ tm->tm_mon + 1, tm->tm_mday);
+ else
+ printf ("%02d:%02d:%02d", tm->tm_hour,
+ tm->tm_min, tm->tm_sec);
break;
}
case 'l':
@@ -636,72 +467,104 @@
}
/* do_prompt - show login prompt, optionally preceded by /etc/issue contents */
-static void do_prompt (void)
+static void do_prompt (int showlogin)
{
-#if ! OLD
FILE *fd;
-#else
- int fd;
-#endif
int c;
- write (1, "\n", 1); /* start a new line */
-#if ! OLD
- if ((fd = fopen (ISSUE, "r"))) {
+ if (nonewline == 0)
+ putchar ('\n');
+ if (noissue == 0 && (fd = fopen (ISSUE, "r"))) {
while ((c = getc (fd)) != EOF) {
if (c == '\\')
- output_special_char (getc(fd));
+ output_special_char (getc (fd));
else
putchar (c);
}
- fflush (stdout);
fclose (fd);
}
-#else
- if ((fd = open (ISSUE, O_RDONLY)) >= 0) {
- close (fd);
- }
-#endif
- if (!nohostname) {
- write (1, hn, strlen (hn));
- write (1, " ", 1);
- }
- write (1, LOGIN, sizeof (LOGIN) - 1);
+ if (nohostname == 0)
+ printf ("%s ", hn);
+ if (showlogin)
+ printf ("%s", LOGIN);
+ fflush (stdout);
}
/* get_logname - get user name, establish speed, erase, kill, eol */
static char *get_logname (void)
{
- static char logname[40];
+ static char logname[4*UT_NAMESIZE];
char *bp;
unsigned char c;
+ int ascii;
+ iconv_t ic;
- /* flush pending input */
-#if defined __GLIBC__ && __GLIBC__ >= 2
- tcflush(0, TCIFLUSH);
-#else
- ioctl (0, TCFLSH, 0);
+ tcflush (0, TCIFLUSH); /* flush pending input */
+
+#ifdef IUTF8
+ /* Check for UTF-8 mode */
+ switch(mode) {
+ case K_UNICODE:
+ ascii = 0;
+ setlocale(LC_CTYPE, "en_US.UTF-8");
+ break;
+ case K_RAW:
+ case K_MEDIUMRAW:
+ case K_XLATE:
+ default:
+ ascii = 1;
+ setlocale(LC_CTYPE, "POSIX");
+ break;
+ }
#endif
for (*logname = 0; *logname == 0;) {
- do_prompt ();
+ do_prompt (1);
for (bp = logname;;) {
if (read (0, &c, 1) < 1) {
- if (errno == EINTR || errno == EIO
- || errno == ENOENT)
- exit (0);
- error ("%s: read: %s", tty, strerror(errno));
+ if (errno == EINTR || errno == EAGAIN) {
+ usleep(1000);
+ continue;
+ }
+ if (errno == EIO || errno == ENOENT)
+ exit (EXIT_SUCCESS);
+ error ("%s: read: %s", tty, strerror (errno));
}
+
if (c == '\n' || c == '\r') {
*bp = 0;
break;
- } else if (!isprint (c))
- error ("%s: invalid character for login name",
- tty);
- else if (bp - logname >= sizeof (logname) - 1)
+ }
+
+ if (ascii && !isprint (c))
+ error ("%s: invalid character 0x%x in login name", tty, c);
+
+ if ((size_t)(bp - logname) >= sizeof (logname) - 1)
error ("%s: too long login name", tty);
- else
- *bp++ = c;
+
+ *bp++ = c;
+ }
+ }
+
+ if (!ascii && (ic = iconv_open("WCHAR_T", "UTF-8"))) {
+ char tmpbuf[4*sizeof(logname)], *op, *lp;
+ size_t len = bp - logname;
+ size_t out = sizeof(tmpbuf) - 1;
+ size_t wcl;
+ wint_t *wcp;
+
+ op = tmpbuf;
+ lp = logname;
+ if ((wcl = iconv(ic , &lp, &len, &op, &out)) == (size_t)-1)
+ error ("%s: invalid character conversion for login name", tty);
+ iconv_close(ic);
+
+ wcp = (wint_t*)tmpbuf;
+ wcp[wcl] = (wint_t)0;
+ while (*wcp) {
+ const wint_t wc = *wcp++;
+ if (!iswprint(wc))
+ error ("%s: invalid character 0x%x in login name", tty, wc);
}
}
return logname;
@@ -709,82 +572,35 @@
static void usage (void)
{
- error ("%s: usage: '%s [--noclear] [--noreset] [--long-hostname] [--no-hostname] [--login program] [--logopts \"loginprg opts\"] tty [term]' with e.g. tty=tty1", VERSION, progname);
+ error ("%s: usage: '%s [--noclear] [--nonewline] [--noissue]"
+ " [--nohangup] [--noreset] [--no-hostname] [--long-hostname]"
+ " [--login program] [--logopts \"loginprg opts\"] [--nice 10]"
+ " [--delay 10] [--chdir /home] [--chroot /chroot] [--autologin user]"
+ " [--old] tty [term]' with e.g. tty=tty1", VERSION, progname);
}
static struct option const long_options[] = {
- { "noclear", no_argument, &noclear, 1},
- { "long-hostname", no_argument, &longhostname, 1},
- { "no-hostname", no_argument, &nohostname, 1},
- { "noreset", no_argument, &noreset, 1},
- { "login", required_argument, 0, 2},
- { "logopts", required_argument, 0, 3},
- { "old", no_argument, &old, 1},
+ { "autologin", required_argument, NULL, 'a' },
+ { "chdir", required_argument, NULL, 'w' },
+ { "chroot", required_argument, NULL, 'r' },
+ { "delay", required_argument, NULL, 'd' },
+ { "noclear", no_argument, &noclear, 1 },
+ { "nonewline", no_argument, &nonewline, 1 },
+ { "noissue", no_argument, &noissue, 1 },
+ { "nohangup", no_argument, &nohangup, 1 },
+ { "noreset", no_argument, &noreset, 1 },
+ { "no-hostname", no_argument, &nohostname, 1 },
+ { "nohostname", no_argument, &nohostname, 1 }, /* compat option */
+ { "login", required_argument, NULL, 'l' },
+ { "loginprog", required_argument, NULL, 'l' }, /* compat option */
+ { "loginopts", required_argument, NULL, 'o' },
+ { "logopts", required_argument, NULL, 'o' },
+ { "long-hostname", no_argument, &longhostname, 1 },
+ { "nice", required_argument, NULL, 'n' },
+ { "old", no_argument, &old, 1 },
{ 0, 0, 0, 0 }
};
-/* Don't allow the user to pass an option as a user name */
-/* To be more safe: Use -- to make sure the rest is interpreted
- * as non-options by the program, if it supports it */
-static void checkname (char* nm)
-{
- char *p = nm;
- if (!nm)
- goto err;
- if (strlen (nm) > 42)
- goto err;
- while (isspace (*p))
- p++;
- if (*p == '-')
- goto err;
- return;
-err:
- error ("checkname: %s", strerror(EPERM));
-}
-
-static void replacename (char** arr, char* nm)
-{
- char *p, *tmp;
- while ((p = *arr)) {
- char *p1 = p;
- while (*p1) {
- if (memcmp (p1, "\\u", 2) == 0)
- {
- tmp = malloc (strlen (p) + strlen (nm));
- if (!tmp)
- error ("replacename: %s", strerror(errno));
- if (p1 != p)
- memcpy (tmp, p, (p1-p));
- *(tmp + (p1-p)) = 0;
- strcat (tmp, nm);
- strcat (tmp, p1+2);
- *arr = tmp;
- }
- p1++;
- }
- arr++;
- }
-}
-
-#define ARRAY_SIZE_MAX 16
-static void mkarray (char** arr, char* str)
-{
- char* p = str; char* start = p;
- int i = 0;
- while (*p && i < (ARRAY_SIZE_MAX - 2))
- {
- if (isspace (*p))
- {
- *p = 0;
- while (isspace (*++p));
- if (*p) { arr[i++] = start; start = p; };
- }
- else
- p++;
- };
- arr[i++] = start; arr[i++] = 0;
-}
-
/*
* main program
*/
@@ -795,40 +611,66 @@
char *logoptstr;
char logcmd[NAME_MAX+1];
char *logarr[ARRAY_SIZE_MAX];
- loginprog = _PATH_LOGIN;
logoptstr = "-- \\u";
progname = basename(argv[0]);
+ if (!progname)
+ progname = "mingetty";
+
uname (&uts);
gethostname (hn, MAXHOSTNAMELEN);
+ hn[MAXHOSTNAMELEN] = '\0';
pid = getpid ();
sid = getsid (0);
- time (&cur_time);
- while ((c = getopt_long (argc, argv, "", long_options, (int *) 0))
+ while ((c = getopt_long (argc, argv, "a:d:l:n:w:r:", long_options, (int *) 0))
!= EOF) {
switch (c) {
- case 0:
- break;
- case 2:
- loginprog = optarg; break;
- case 3:
- logoptstr = optarg; break;
- default:
- usage ();
+ case 0:
+ break;
+ case 'a':
+ if (!optarg) usage ();
+ autologin = optarg;
+ break;
+ case 'd':
+ if (!optarg) usage ();
+ delay = atoi (optarg);
+ break;
+ case 'l':
+ if (!optarg) usage ();
+ loginprog = optarg;
+ break;
+ case 'o':
+ if (!optarg) usage ();
+ logoptstr = optarg;
+ break;
+ case 'n':
+ if (!optarg) usage ();
+ priority = atoi (optarg);
+ break;
+ case 'r':
+ if (!optarg) usage ();
+ ch_root = optarg;
+ break;
+ case 'w':
+ if (!optarg) usage ();
+ ch_dir = optarg;
+ break;
+ default:
+ usage ();
}
}
- if (!longhostname && (s = strchr(hn, '.')))
+ if (longhostname == 0 && (s = strchr (hn, '.')))
*s = '\0';
tty = argv[optind++];
if (!tty)
usage ();
- /* Skip the "/dev/", we may add it later */
+ /* Skip the "/dev/", we add it later */
if (strncmp (tty, "/dev/", 5) == 0)
tty += 5;
- /* On virtual console remeber the line which is used for */
+ /* On virtual console remember the line which is used for */
if (strncmp(tty, "tty", 3) == 0 && strspn(tty + 3, "0123456789") == strlen(tty+3))
vcline = tty+3;
@@ -839,30 +681,40 @@
setenv("TERM", DEFAULT_TERM, 1);
update_utmp ();
+ if (delay)
+ sleep (delay);
open_tty ();
/* flush input and output queues, important for modems */
-#if defined __GLIBC__ && __GLIBC__ >= 2
tcflush(0, TCIOFLUSH);
-#else
- ioctl (0, TCFLSH, 2);
-#endif
- while ((logname = get_logname ()) == 0);
+ if (autologin) {
+ do_prompt (0);
+ printf ("%s%s (automatic login)\n", LOGIN, autologin);
+ logname = autologin;
+ logoptstr = "-f \\u";
+ } else {
+ while ((logname = get_logname ()) == 0)
+ /* do nothing */ ;
+ }
+
strncpy (logcmd, loginprog, NAME_MAX);
strncat (logcmd, " ", NAME_MAX - strlen(logcmd));
strncat (logcmd, logoptstr, NAME_MAX - strlen(logcmd));
- mkarray (logarr, logcmd);
checkname (logname);
+ mkarray (logarr, logcmd);
replacename (logarr, logname);
-#if DEBUG_THIS
- printf ("About to execute %s", logcmd);
- c = 1; while (logarr[c]) printf (" `%s'", logarr[c++]);
- printf ("\n"); sleep (1);
-#endif
+ if (ch_root)
+ chroot (ch_root);
+ if (ch_dir)
+ chdir (ch_dir);
+ if (priority)
+ nice (priority);
+
execv (loginprog, logarr);
- error ("%s: can't exec %s: %s", tty, loginprog, strerror(errno));
- sleep (1); exit (0);
+ error ("%s: can't exec %s: %s", tty, loginprog, strerror (errno));
+ sleep (1);
+ exit (EXIT_FAILURE);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mingetty-0.9.6s/revoke.c new/mingetty-1.0.7s/revoke.c
--- old/mingetty-0.9.6s/revoke.c 1970-01-01 01:00:00.000000000 +0100
+++ new/mingetty-1.0.7s/revoke.c 2007-05-29 16:51:29.000000000 +0200
@@ -0,0 +1,310 @@
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <termios.h>
+#include <unistd.h>
+#include <sys/kd.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+#include "revoke.h"
+static int sigfholder(const char *path, int sig);
+
+#ifdef TEST
+#define error(fmt,args...) syslog(LOG_ERR,fmt,args);exit(1)
+#define warn(fmt,args...) syslog(LOG_WARN,fmt,args)
+#else
+extern void error (const char *fmt, ...);
+extern void warn (const char *fmt, ...);
+#endif
+
+#ifndef IUTF8
+# error IUTF8 input flag not defined
+#endif
+
+/*
+ * Hang up any vcs terminal line
+ */
+void vcshangup(const gid_t gid, const char * const vcline)
+{
+ struct stat st;
+ char buf[PATH_MAX+1];
+
+ if (!vcline)
+ goto skip;
+
+ /* Set up new virtual console text capture devices */
+ strncpy (buf, "/dev/vcs", PATH_MAX);
+ strncat (buf, vcline, PATH_MAX - strlen(buf));
+
+ if (stat(buf, &st) < 0) {
+ if (errno != ENOENT)
+ error ("%s: %s", buf, strerror(errno));
+ goto skip;
+ }
+ if (chown (buf, 0, gid) || chmod (buf, (gid ? 0660 : 0600))) {
+ if (errno == EROFS)
+ warn("%s: %s", buf, strerror(errno));
+ else
+ error ("%s: %s", buf, strerror(errno));
+ }
+# ifdef __NR_revoke
+ _syscall(int, revoke, const char*, buf);
+# else
+ if (sigfholder(buf, SIGHUP)) { /* Be nice, send SIGHUP */
+ sleep (2);
+ if (sigfholder(buf, SIGKILL)) /* Hey, go away */
+ sigfholder(buf, SIGCONT);
+ }
+# endif /* __NR_revoke */
+
+ /* Set up new virtual console text/attribute capture devices */
+ strncpy (buf, "/dev/vcsa", PATH_MAX);
+ strncat (buf, vcline, PATH_MAX - strlen(buf));
+
+ if (stat(buf, &st) < 0) {
+ if (errno != ENOENT)
+ error ("%s: %s", buf, strerror(errno));
+ goto skip;
+ }
+ if (chown (buf, 0, gid) || chmod (buf, (gid ? 0660 : 0600))) {
+ if (errno == EROFS)
+ warn("%s: %s", buf, strerror(errno));
+ else
+ error ("%s: %s", buf, strerror(errno));
+ }
+# ifdef __NR_revoke
+ _syscall(int, revoke, const char*, buf);
+# else
+ if (sigfholder(buf, SIGHUP)) { /* Be nice, send SIGHUP */
+ sleep (2);
+ if (sigfholder(buf, SIGKILL)) /* Hey, go away */
+ sigfholder(buf, SIGCONT);
+ }
+# endif /* __NR_revoke */
+skip:
+ return;
+}
+
+/*
+ * Reset terminal on stdin
+ */
+void reset_stdin(const int mode)
+{
+ struct termios termios;
+ /* The above reset only puts the output things into a sane state.
+ * The input state is not reset.
+ */
+ memset (&termios, 0, sizeof termios);
+ if (tcgetattr (0, &termios))
+ warn ("tcgetattr problem: %s", strerror(errno));
+
+ /* Use defaults of <sys/ttydefaults.h> for base settings */
+ termios.c_iflag |= TTYDEF_IFLAG;
+ termios.c_oflag |= TTYDEF_OFLAG;
+ termios.c_lflag |= TTYDEF_LFLAG;
+ termios.c_cflag |= (TTYDEF_SPEED | TTYDEF_CFLAG);
+
+ /* Sane setting, allow eight bit characters, no carriage return delay
+ * the same result as `stty sane cr0 pass8'
+ */
+ termios.c_iflag |= (BRKINT | ICRNL | IMAXBEL);
+ termios.c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IUCLC | IXANY | ISTRIP);
+ termios.c_oflag |= (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0);
+ termios.c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | OFDEL |\
+ NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY);
+ termios.c_lflag |= (ISIG | ICANON | IEXTEN | ECHO|ECHOE|ECHOK|ECHOCTL|ECHOKE);
+ termios.c_lflag &= ~(ECHONL | NOFLSH | XCASE | TOSTOP | ECHOPRT);
+ termios.c_cflag |= (CREAD | CS8 | B38400);
+ termios.c_cflag &= ~(PARENB);
+#ifdef IUTF8
+ /* Set UTF-8 input flag */
+ switch(mode) {
+ case K_UNICODE:
+ termios.c_iflag |= IUTF8;
+ break;
+ case K_RAW:
+ case K_MEDIUMRAW:
+ case K_XLATE:
+ default:
+ termios.c_iflag &= ~IUTF8;
+ break;
+ }
+#endif
+ /* VTIME and VMIN can overlap with VEOF and VEOL since they are
+ * only used for non-canonical mode. We just set the at the
+ * beginning, so nothing bad should happen.
+ */
+ termios.c_cc[VTIME] = 0;
+ termios.c_cc[VMIN] = 1;
+ termios.c_cc[VINTR] = CINTR;
+ termios.c_cc[VQUIT] = CQUIT;
+ termios.c_cc[VERASE] = CERASE; /* ASCII DEL (0177) */
+ termios.c_cc[VKILL] = CKILL;
+ termios.c_cc[VEOF] = CEOF;
+ termios.c_cc[VSWTC] = _POSIX_VDISABLE;
+ termios.c_cc[VSTART] = CSTART;
+ termios.c_cc[VSTOP] = CSTOP;
+ termios.c_cc[VSUSP] = CSUSP;
+ termios.c_cc[VEOL] = _POSIX_VDISABLE;
+ termios.c_cc[VREPRINT] = CREPRINT;
+ termios.c_cc[VDISCARD] = CDISCARD;
+ termios.c_cc[VWERASE] = CWERASE;
+ termios.c_cc[VLNEXT] = CLNEXT;
+ termios.c_cc[VEOL2] = _POSIX_VDISABLE;
+ if (tcsetattr (0, TCSADRAIN, &termios))
+ warn ("tcsetattr problem: %s", strerror(errno));
+}
+
+/*
+ * Don't allow the user to pass an option as a user name
+ * To be more safe: Use -- to make sure the rest is interpreted
+ * as non-options by the program, if it supports it
+ */
+void checkname (const char* nm)
+{
+ const char *p = nm;
+ if (!nm)
+ goto err;
+ if (strlen (nm) > 42)
+ goto err;
+ while (isspace (*p))
+ p++;
+ if (*p == '-')
+ goto err;
+ return;
+err:
+ error ("checkname: %s", strerror(EPERM));
+}
+
+void replacename (char** arr, const char* nm)
+{
+ const char *p;
+ char *tmp;
+ while ((p = *arr)) {
+ const char *p1 = p;
+ while (*p1) {
+ if (memcmp (p1, "\\u", 2) == 0) {
+ tmp = malloc (strlen (p) + strlen (nm));
+ if (!tmp)
+ error ("replacename: %s", strerror(errno));
+ if (p1 != p)
+ memcpy (tmp, p, (p1-p));
+ *(tmp + (p1-p)) = 0;
+ strcat (tmp, nm);
+ strcat (tmp, p1+2);
+ *arr = tmp;
+ }
+ p1++;
+ }
+ arr++;
+}
+}
+
+void mkarray (char** arr, char* str)
+{
+ char* p = str;
+ char* start = p;
+ int i = 0;
+
+ while (*p && i < (ARRAY_SIZE_MAX - 2)) {
+ if (isspace (*p)) {
+ *p = 0;
+ while (isspace (*++p))
+ ;
+ if (*p) {
+ arr[i++] = start;
+ start = p;
+ }
+ } else
+ p++;
+ }
+ arr[i++] = start;
+ arr[i++] = (char*)0;
+}
+
+static int sigfholder(const char *path, int sig)
+{
+ char buf[MAXNAMLEN], *ptr;
+ pid_t pid;
+ DIR *proc, *fds;
+ struct dirent *task, *fd;
+ FILE *fp;
+ struct stat st, lnk;
+ int cnt = 0;
+
+ if ((proc = opendir("/proc")) == (DIR *)0) {
+ error("cannot opendir(/proc): %s\n", strerror(errno));
+ }
+
+ if (stat(path, &st) < 0) {
+ error("cannot stat %s: %s\n", path, strerror(errno));
+ }
+
+ while((task = readdir(proc)) != (struct dirent *)0) {
+ pid = (pid_t)atoi(task->d_name);
+
+ if (pid == 0 || pid == getpid() || pid == getppid())
+ continue;
+
+ (void) strcpy(buf,"/proc/");
+ (void) strcat(strcat(buf, task->d_name), "/maps");
+ if ((fp = fopen(buf,"r")) == (FILE*)0) {
+ if (errno != ENOENT)
+ warn("cannot open(%s): %s\n", buf, strerror(errno));
+ continue;
+ }
+ while ((fgets(buf, MAXNAMLEN, fp))) {
+ ptr = strrchr(buf, ' ');
+ if (*(++ptr) == '/' && strncmp(path, ptr, strlen(ptr)-1) == 0) {
+ kill(pid, sig);
+ cnt++;
+ goto out_maps;
+ }
+ }
+ out_maps:
+ fclose(fp);
+
+ (void) strcpy(buf,"/proc/");
+ (void) strcat(strcat(buf, task->d_name), "/fd");
+ if ((fds = opendir(buf)) == (DIR *)0) {
+ if (errno != ENOENT && errno != EPERM)
+ warn("cannot opendir(%s): %s\n", buf, strerror(errno));
+ continue;
+ }
+ ptr = strcat(buf, "/");
+ ptr = ptr + strlen(buf);
+ while ((fd = readdir(fds)) != (struct dirent *)0) {
+ if (*fd->d_name == '.')
+ continue;
+ (void) strcpy(ptr, fd->d_name);
+ if (stat(buf, &lnk) < 0) {
+ continue;
+ }
+ if (st.st_dev == lnk.st_dev && st.st_ino == lnk.st_ino) {
+ kill(pid, sig);
+ cnt++;
+ goto out_fds;
+ }
+ }
+ out_fds:
+ closedir(fds);
+ }
+ closedir(proc);
+ return cnt;
+}
+
+#ifdef TEST
+int main (int argc, char * argv[])
+{
+ if (++argv && *argv && (*argv)[0] != '\0')
+ printf("%d\n", sigfholder(*argv, SIGHUP));
+ return 0;
+}
+#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mingetty-0.9.6s/revoke.h new/mingetty-1.0.7s/revoke.h
--- old/mingetty-0.9.6s/revoke.h 1970-01-01 01:00:00.000000000 +0100
+++ new/mingetty-1.0.7s/revoke.h 2007-05-29 16:51:10.000000000 +0200
@@ -0,0 +1,16 @@
+#ifndef _SIGFHOLDER_H
+#define _SIGFHOLDER_H
+extern void vcshangup(const gid_t gid, const char * const vcline);
+extern void reset_stdin(const int mode);
+extern void checkname (const char* nm);
+extern void replacename (char** arr, const char* nm);
+#define ARRAY_SIZE_MAX 16
+extern void mkarray (char** arr, char* str);
+#ifndef IUTF8
+# ifndef ASM_IUTF8
+# error IUTF8 input flag not defined
+# else
+# define IUTF8 ASM_IUTF8
+# endif
+#endif
+#endif /* _SIGFHOLDER_H */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mingetty-0.9.6s/sigfholder.c new/mingetty-1.0.7s/sigfholder.c
--- old/mingetty-0.9.6s/sigfholder.c 2002-03-27 10:57:06.000000000 +0100
+++ new/mingetty-1.0.7s/sigfholder.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,103 +0,0 @@
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <dirent.h>
-#include <syslog.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#ifdef TEST
-#define error(fmt,args...) syslog(LOG_ERR,fmt,args);exit(1)
-#define warn(fmt,args...) syslog(LOG_WARN,fmt,args)
-#else
-extern void error (const char *fmt, ...);
-extern void warn (const char *fmt, ...);
-#endif
-
-#ifdef TEST
-static int sigfholder(const char *path, int sig)
-#else
-int sigfholder(const char *path, int sig)
-#endif
-{
- char buf[MAXNAMLEN], *ptr;
- pid_t pid;
- DIR *proc, *fds;
- struct dirent *task, *fd;
- FILE *fp;
- struct stat st, lnk;
- int cnt = 0;
-
- if ((proc = opendir("/proc")) == (DIR *)0) {
- error("cannot opendir(/proc): %s\n", strerror(errno));
- }
-
- if (stat(path, &st) < 0) {
- error("cannot stat %s: %s\n", path, strerror(errno));
- }
-
- while((task = readdir(proc)) != (struct dirent *)0) {
- pid = (pid_t)atoi(task->d_name);
-
- if (pid == 0 || pid == getpid() || pid == getppid())
- continue;
-
- (void) strcpy(buf,"/proc/");
- (void) strcat(strcat(buf, task->d_name), "/maps");
- if ((fp = fopen(buf,"r")) == (FILE*)0) {
- if (errno != ENOENT)
- warn("cannot open(%s): %s\n", buf, strerror(errno));
- continue;
- }
- while ((fgets(buf, MAXNAMLEN, fp))) {
- ptr = strrchr(buf, ' ');
- if (*(++ptr) == '/' && strncmp(path, ptr, strlen(ptr)-1) == 0) {
- kill(pid, sig);
- cnt++;
- goto out_maps;
- }
- }
- out_maps:
- fclose(fp);
-
- (void) strcpy(buf,"/proc/");
- (void) strcat(strcat(buf, task->d_name), "/fd");
- if ((fds = opendir(buf)) == (DIR *)0) {
- if (errno != ENOENT && errno != EPERM)
- warn("cannot opendir(%s): %s\n", buf, strerror(errno));
- continue;
- }
- ptr = strcat(buf, "/");
- ptr = ptr + strlen(buf);
- while ((fd = readdir(fds)) != (struct dirent *)0) {
- if (*fd->d_name == '.')
- continue;
- (void) strcpy(ptr, fd->d_name);
- if (stat(buf, &lnk) < 0) {
- continue;
- }
- if (st.st_dev == lnk.st_dev && st.st_ino == lnk.st_ino) {
- kill(pid, sig);
- cnt++;
- goto out_fds;
- }
- }
- out_fds:
- closedir(fds);
- }
- closedir(proc);
- return cnt;
-}
-
-#ifdef TEST
-int main (int argc, char * argv[])
-{
- if (++argv && *argv && (*argv)[0] != '\0')
- printf("%d\n", sigfholder(*argv, SIGHUP));
- return 0;
-}
-#endif
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0