[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#772597: man-db postinst: non-portable user/group identity setting



Package: man-db
Version: 2.7.0.2-4
User: debian-bsd@lists.debian.org
Usertags: kfreebsd

This is how man-db postinst changes user/group identity:

   perl -e '@pwd = getpwnam("man"); $( = $) = $pwd[3]; $< = $> = $pwd[2];
            exec "/usr/bin/mandb", @ARGV' -- "$@" || true

This works well on Linux, but at least on kfreebsd-i386, this code changes only the effective uid/gid, leaving the real uid/gid untouched:

# perl -E '$< = $> = 6; say "$< $>";'
0 6


You should either change the real uid/gid first, or change them both at the same time:

# perl -E '$> = $< = 6; say "$< $>";'
6 6

# perl -E '($<, $>) = (6, 6); say "$< $>";'
6 6


-- System Information:
Debian Release: 8.0
 APT prefers unstable
 APT policy: (990, 'unstable'), (1, 'experimental')
Architecture: kfreebsd-i386 (i386)

Kernel: kFreeBSD 9.2-1-686

--
Jakub Wilk


Reply to: