OBS User unknown 2008-03-21 00:55:19 +00:00 committed by Git OBS Bridge
parent 9ccb3e25a2
commit 857c6423c6
9 changed files with 1399 additions and 906 deletions

View File

@ -1,3 +1,33 @@
Using uuidd
-----------
The uuidd is a solution to guarantee unique time-based UUIDs. In the
past there was the problem that UUIDs created by libuuid have not been
guaranteed to be unique if you run multiple processes/threads which
create lots of UUIDs simultaneously. In order to use this daemon you
have to run this daemon with SUID/SGID bit set:
1. Modify your local permissions setting by adding the following
line to your /etc/permissions.local
/usr/sbin/uuidd uuidd:uuidd 6755
2. Set the permissions with
$ chkstat --set /etc/permissions.local
3. enable the service uuidd either in YaST or with
$ insserv uuidd
The damon is designed to run on demand by default, this means
it is started automatically by libuuid when needed and it
terminates by default after 5 minutes of inactivity.
However if you wish to run the daemon permanently you can
set the parameter UUIDD_ON_DEMAND_ONLY in /etc/sysconfig/uuidd
to "no".
Note, the damon is not needed in general to create time-based
UUIDs, it is only needed to assure the uniqueness of UUIDs
when creating lots of them in a short amount of time.
e2fsprogs-devel
---------------
Since the e2fsprogs libraries has been split out into own packages,
each having its own devel package
libext2fs-devel

View File

@ -1,50 +0,0 @@
After the fix for resize2fs's inode mover losing in-inode
extended attributes, the regression test I wrote caught
that the attrs were still getting lost on powerpc.
Looks like the problem is that ext2fs_swap_inode_full()
isn't paying attention to whether or not the EA magic is
in hostorder, so it's not recognized (and not swapped)
on BE machines. Patch below seems to fix it.
Yay for regression tests. ;)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
Index: e2fsprogs-1.40.7/lib/ext2fs/swapfs.c
===================================================================
--- e2fsprogs-1.40.7.orig/lib/ext2fs/swapfs.c
+++ e2fsprogs-1.40.7/lib/ext2fs/swapfs.c
@@ -133,7 +133,7 @@ void ext2fs_swap_inode_full(ext2_filsys
struct ext2_inode_large *f, int hostorder,
int bufsize)
{
- unsigned i, has_data_blocks, extra_isize;
+ unsigned i, has_data_blocks, extra_isize, attr_magic;
int islnk = 0;
__u32 *eaf, *eat;
@@ -231,13 +231,17 @@ void ext2fs_swap_inode_full(ext2_filsys
eaf = (__u32 *) (((char *) f) + sizeof(struct ext2_inode) +
extra_isize);
-
- if (ext2fs_swab32(*eaf) != EXT2_EXT_ATTR_MAGIC)
- return; /* it seems no magic here */
-
eat = (__u32 *) (((char *) t) + sizeof(struct ext2_inode) +
extra_isize);
+
+ if (hostorder)
+ attr_magic = *eaf;
*eat = ext2fs_swab32(*eaf);
+ if (!hostorder)
+ attr_magic = *eat;
+
+ if (attr_magic != EXT2_EXT_ATTR_MAGIC)
+ return; /* it seems no magic here */
/* convert EA(s) */
ext2fs_swap_ext_attr((char *) (eat + 1), (char *) (eaf + 1),

View File

@ -0,0 +1,122 @@
Index: e2fsprogs-1.40.7/misc/uuidd.c
===================================================================
--- e2fsprogs-1.40.7.orig/misc/uuidd.c
+++ e2fsprogs-1.40.7/misc/uuidd.c
@@ -52,6 +52,14 @@ static void usage(const char *progname)
exit(1);
}
+
+static void die(const char *msg)
+{
+ perror(msg);
+ exit(1);
+}
+
+
static void create_daemon(void)
{
pid_t pid;
@@ -75,7 +83,8 @@ static void create_daemon(void)
chdir("/");
(void) setsid();
euid = geteuid();
- (void) setreuid(euid, euid);
+ if (setreuid(euid, euid) < 0)
+ die("setreuid");
}
static int read_all(int fd, char *buf, size_t count)
@@ -132,7 +141,7 @@ static int call_daemon(const char *socke
}
srv_addr.sun_family = AF_UNIX;
- strcpy(srv_addr.sun_path, socket_path);
+ snprintf(srv_addr.sun_path, sizeof(srv_addr.sun_path), "%s", socket_path);
if (connect(s, (const struct sockaddr *) &srv_addr,
sizeof(struct sockaddr_un)) < 0) {
@@ -252,7 +261,7 @@ static void server_loop(const char *sock
* Create the address we will be binding to.
*/
my_addr.sun_family = AF_UNIX;
- strcpy(my_addr.sun_path, socket_path);
+ snprintf(my_addr.sun_path, sizeof(my_addr.sun_path), "%s", socket_path);
(void) unlink(socket_path);
save_umask = umask(0);
if (bind(s, (const struct sockaddr *) &my_addr,
@@ -415,11 +424,11 @@ int main(int argc, char **argv)
switch (c) {
case 'd':
debug++;
- drop_privs++;
+ drop_privs = 1;
break;
case 'k':
do_kill++;
- drop_privs++;
+ drop_privs = 1;
break;
case 'n':
num = strtol(optarg, &tmp, 0);
@@ -429,18 +438,18 @@ int main(int argc, char **argv)
}
case 'p':
pidfile_path = optarg;
- drop_privs++;
+ drop_privs = 1;
break;
case 'q':
quiet++;
break;
case 's':
socket_path = optarg;
- drop_privs++;
+ drop_privs = 1;
break;
case 't':
do_type = UUIDD_OP_TIME_UUID;
- drop_privs++;
+ drop_privs = 1;
break;
case 'T':
timeout = strtol(optarg, &tmp, 0);
@@ -451,7 +460,7 @@ int main(int argc, char **argv)
break;
case 'r':
do_type = UUIDD_OP_RANDOM_UUID;
- drop_privs++;
+ drop_privs = 1;
break;
default:
usage(argv[0]);
@@ -460,17 +469,23 @@ int main(int argc, char **argv)
uid = getuid();
if (uid && drop_privs) {
gid = getgid();
-#ifdef HAVE_SETRESUID
- setresuid(uid, uid, uid);
+#ifdef HAVE_SETRESGID
+ if (setresgid(gid, gid, gid) < 0)
+ die("setresgid");
#else
- setreuid(uid, uid);
+ if (setregid(gid, gid) < 0)
+ die("setregid");
#endif
-#ifdef HAVE_SETRESGID
- setresgid(gid, gid, gid);
+
+#ifdef HAVE_SETRESUID
+ if (setresuid(uid, uid, uid) < 0)
+ die("setresuid");
#else
- setregid(gid, gid);
+ if (setreuid(uid, uid) < 0)
+ die("setreuid");
#endif
}
+
if (num && do_type) {
ret = call_daemon(socket_path, do_type+2, buf,
sizeof(buf), &num, &err_context);

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:02491e8e0dd569fa0762556632b8a562c794a902d4881fa0420cebae52926e54
size 3681509

View File

@ -0,0 +1,26 @@
diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
index 6576c59..e07e87c 100644
--- a/lib/ext2fs/swapfs.c
+++ b/lib/ext2fs/swapfs.c
@@ -133,7 +133,7 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
struct ext2_inode_large *f, int hostorder,
int bufsize)
{
- unsigned i, has_data_blocks, extra_isize;
+ unsigned i, has_data_blocks, extra_isize, attr_magic;
int islnk = 0;
__u32 *eaf, *eat;
@@ -232,7 +232,11 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
eaf = (__u32 *) (((char *) f) + sizeof(struct ext2_inode) +
extra_isize);
- if (ext2fs_swab32(*eaf) != EXT2_EXT_ATTR_MAGIC)
+ attr_magic = *eaf;
+ if (!hostorder)
+ attr_magic = ext2fs_swab32(attr_magic);
+
+ if (attr_magic != EXT2_EXT_ATTR_MAGIC)
return; /* it seems no magic here */
eat = (__u32 *) (((char *) t) + sizeof(struct ext2_inode) +

3
e2fsprogs-1.40.8.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2a64b76929772c018618819e17fdf0db7ae4a051562d24eaa25f22909c90dfb5
size 3687806

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Tue Mar 18 17:51:59 CET 2008 - pth@suse.de
- Readd the current de.po just submitted upstream to the TP robot.
-------------------------------------------------------------------
Fri Mar 14 12:28:32 CET 2008 - mkoenig@suse.de
- update to version 1.40.8
* Fixed e2image -I so it works on image files which are larger than 2GB
* Fixed e2fsck's handling of directory inodes with a corrupt size field
* Fixed e2fsck handling of pass 2 "should never happen error"
* Fixed Resize2fs bug resizing large inodes with extended attributes
- update README.SUSE: give some hints on enabling uuidd, since it has
been decided to not enable it by default [bnc#354398]
- removed
de.po (updated upstream)
-------------------------------------------------------------------
Tue Mar 4 15:36:51 CET 2008 - mkoenig@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package e2fsprogs (Version 1.40.7)
# spec file for package e2fsprogs (Version 1.40.8)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@ -19,12 +19,12 @@ Group: System/Filesystems
Supplements: filesystem(ext2) filesystem(ext3)
PreReq: %install_info_prereq
AutoReqProv: on
Version: 1.40.7
Version: 1.40.8
Release: 1
Summary: Utilities for the Second Extended File System
Url: http://e2fsprogs.sourceforge.net
Source: %{name}-%{version}.tar.bz2
Source1: de.po
Source1: e2fsprogs-1.40.7.de.po
Source2: README.SUSE
Source3: uuidd.rc
Source4: sysconfig.uuidd
@ -35,7 +35,8 @@ Patch1: e2fsprogs-mdraid.patch
Patch2: e2fsprogs-base_devt.patch
Patch3: e2fsprogs-libvolume_id-support.patch
Patch5: e2fsprogs-1.40.4-uuidd_pid_path.patch
Patch6: e2fsprogs-1.40.7-fix_ext2fs_swap_inode_full.patch
Patch6: e2fsprogs-1.40.7-uuidd_security.patch
Patch7: e2fsprogs-1.40.8-fix_ext2fs_swap_inode_full.patch
# libcom_err patches
# 66534 - [SL 10.0] et_list handling of krb5 and libcom_err.so.2 conflict
Patch31: libcom_err-no-init_error_table.patch
@ -45,7 +46,6 @@ Patch34: libcom_err-compile_et_permissions.patch
# Do not suppress make commands
Patch99: e2fsprogs-no_cmd_hiding.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#Requires: libext2fs2 = %{version} libcom_err2 = %{version} libuuid1 = %{version} libblkid1 = %{version}
%description
Utilities needed to create and maintain ext2 and ext3 file systems
@ -230,6 +230,7 @@ Authors:
%patch3 -p0
%patch5 -p1
%patch6 -p1
%patch7 -p1
# libcom_err patches
%patch31 -p1
%patch32 -p1
@ -238,7 +239,7 @@ Authors:
%if %{no_command_hiding}
%patch99 -p1
%endif
cp %{S:1} po
cp %{S:1} po/de.po
cp %{SOURCE2} .
%build
@ -253,10 +254,6 @@ cp %{SOURCE2} .
--disable-evms \
CFLAGS="$RPM_OPT_FLAGS -fsigned-char"
make
# recreate german .gmo file
pushd po
make de.gmo
popd
%install
make install install-libs DESTDIR=$RPM_BUILD_ROOT ELF_INSTALL_DIR=/%{_lib}
@ -440,6 +437,18 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/com_err.3.gz
%changelog
* Tue Mar 18 2008 pth@suse.de
- Readd the current de.po just submitted upstream to the TP robot.
* Fri Mar 14 2008 mkoenig@suse.de
- update to version 1.40.8
* Fixed e2image -I so it works on image files which are larger than 2GB
* Fixed e2fsck's handling of directory inodes with a corrupt size field
* Fixed e2fsck handling of pass 2 "should never happen error"
* Fixed Resize2fs bug resizing large inodes with extended attributes
- update README.SUSE: give some hints on enabling uuidd, since it has
been decided to not enable it by default [bnc#354398]
- removed
de.po (updated upstream)
* Tue Mar 04 2008 mkoenig@suse.de
- update to version 1.40.7
* Remove support for clearing the SPARSE_SUPER feature from tune2fs, and