[LIBREPORT PATCH v2] - don't suid before running yum related to rhbz#759443

2013-03-06 Thread Jiri Moskovcak
- if run with root privileges, the debuginfo install script is not suided to abrt, but the installed debuginfo files has to be owned by abrt:abrt, so they can be removed by abrt (e.d. when trimming old files) and that is done using the ensure_abrt_uid decorator Signed-off-by: Jiri Moskovcak

Re: [LIBREPORT PATCH v2] - don't suid before running yum related to rhbz#759443

2013-03-06 Thread Jakub Filak
@@ -36,8 +59,10 @@ def unpack_rpm(package_file_name, files, tmp_dir, destdir, keeprpm, exact_files= except IOError, ex: print _(Can't write to '{0}': {1}).format(unpacked_cpio_path, ex) return RETURN_FAILURE + rpm2cpio = Popen([rpm2cpio, package_full_path],

Re: [LIBREPORT PATCH v2] - don't suid before running yum related to rhbz#759443

2013-03-06 Thread Jakub Filak
It doesn't download debuginfo under root at all: [root@dhcp-25-54 ccpp-2013-03-06-13:52:30-27833]# abrt-cli report /var/tmp/abrt/ccpp-2013-03-06-13:52:30-27833 Analyzing coredump 'coredump' Coredump references 3 debuginfo files, 1 of them are not installed Setting up yum repositories Looking for

Re: [LIBREPORT PATCH v2] - don't suid before running yum related to rhbz#759443

2013-03-06 Thread Jakub Filak
On Wednesday, March 06, 2013 12:55:20 PM Jiri Moskovcak wrote: +def ensure_abrt_uid(fn): +import pwd +current_uid = os.getuid() +current_gid = os.getgid() +abrt = pwd.getpwnam(abrt) + +# if we're are already running as abrt, don't do anything +if abrt.pw_uid ==