Hello community, here is the log from the commit of package iouyap for openSUSE:Factory checked in at 2015-01-14 11:45:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/iouyap (Old) and /work/SRC/openSUSE:Factory/.iouyap.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "iouyap" Changes: -------- --- /work/SRC/openSUSE:Factory/iouyap/iouyap.changes 2014-12-16 14:47:58.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.iouyap.new/iouyap.changes 2015-01-14 11:45:54.000000000 +0100 @@ -1,0 +2,5 @@ +Tue Jan 13 10:40:24 UTC 2015 - [email protected] + +- added iouyap-0.95_fix_ownership.patch from upstream code + +------------------------------------------------------------------- New: ---- iouyap-0.95_fix_ownership.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ iouyap.spec ++++++ --- /var/tmp/diff_new_pack.JXILtm/_old 2015-01-14 11:45:55.000000000 +0100 +++ /var/tmp/diff_new_pack.JXILtm/_new 2015-01-14 11:45:55.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package iouyap # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,6 +27,7 @@ Patch0: %{name}-0.95_buff_overflow.patch Patch1: %{name}-0.95_log_error.patch Patch2: %{name}-0.95_fix_packet_mem_corruption.patch +Patch3: %{name}-0.95_fix_ownership.patch BuildRequires: bison BuildRequires: flex BuildRequires: gcc @@ -48,6 +49,7 @@ %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build bison --yacc -dv netmap_parse.y ++++++ iouyap-0.95_fix_ownership.patch ++++++ diff --git a/iouyap.c b/iouyap.c index 944331a..1454820 100644 --- a/iouyap.c +++ b/iouyap.c @@ -63,7 +63,7 @@ foreign_port_t *port_table = NULL; static int set_socket_directory (char *dir) { - return snprintf (dir, UNIX_PATH_MAX, "%s%u", NETIO_DIR_PREFIX, geteuid ()); + return snprintf (dir, UNIX_PATH_MAX, "%s%u", NETIO_DIR_PREFIX, getuid ()); } @@ -776,6 +776,10 @@ open_pcap_file (foreign_port_t * port, char *file, int no_hdr, int overwrite) if ((fd = open (file, O_CREAT | O_WRONLY | O_APPEND, S_IRUSR | S_IWUSR)) < 0) fatal_error ("open"); + + if( getuid() != geteuid() ) + if( fchown(fd, getuid (), -1) ) + fatal_error ("fchown"); /* If we can get an exclusive lock (without blocking) then check to see * if the file is empty. Write a pcap header if it is. @@ -1028,6 +1032,10 @@ open_iou_uds () unlink (sock_addr.sun_path); if (bind (sfd, (struct sockaddr *) &sock_addr, sizeof sock_addr)) fatal_error ("bind"); + + if( getuid() != geteuid() ) + if( chown(sock_addr.sun_path, getuid (), -1) ) + fatal_error ("chown"); return sfd; } -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
