[Rpm-maint] PATCH 4/2013 Reimplement setprogname() and getprogname() to be generic and portable

Kamil Rytarowski n54 at gmx.com
Mon Feb 22 07:33:43 UTC 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 22.02.2016 03:45, Neal Gompa wrote:
> On Fri, Feb 12, 2016 at 6:42 PM, Kamil Rytarowski <n54 at gmx.com>
> wrote:
>> 
>> Thanks!
>> 
>> I somehow lost interest since --chroot cannot be implemented
>> with rpm(1) on NetBSD with chroot(2). There is not known a
>> breakage from NetBSD chroot.
> 
> Kamil,
> 
> Two things: * Doesn't --root already use chroot(2)? Also, as far as
> I knew, rpm's transaction stuff also uses chroot(2). Isn't
> chroot(2) on NetBSD compatible with chroot(2) on Linux and other
> BSDs?
> 
> * How is it rpm(1) on NetBSD? As far as I knew, the man page for
> rpm puts it in section 8, so it should be rpm(8).
> 
> In any case, thanks for the contribution!
> 
> 
> 

RPM --root (sorry, not --chroot) uses the chroot(2) technique to
deploy software under prefix.

To use chroot(2) on NetBSD for the --root option (at least 2 years
ago) RPM shall be rewritten.. because it assumes sequential entering
and exiting to and from the changed root directory.

This use-case is denied on NetBSD, for example please see:

https://deepsec.net/docs/Slides/2015/Chw00t_How_To_Break%20Out_from_Vari
ous_Chroot_Solutions_-_Bucsay_Balazs.pdf

I'm not claiming that it is unbreakable at all, just it's not that
trivial like with the Linux kernel where we need to (IIRC) call
fchdir(2) twice.

My solution was to use another tool (pkgsrc) and it works well for me.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWyrnVAAoJEEuzCOmwLnZsH4oP/iV4qgkwVPTZ25mV1bh+vNYJ
HYSpt3EkKVzg4Q2rVonWWR7j+XD0MdH7BRM1FRyBTlSV3c0+ht5kZDqXt5zWTa0a
Evq3GMBqJ6ri6EYPJyqs5A7UHIYoRcVYp/I1pvDFrB6LDda+GDPRhMIMEs+lmsuf
djxX0x77huiJcy7UKxGf3NuZYiV8bPUr/qVWWGcRSxjJVvcN+M7C2w3HitoJ6TaC
NeVtRs/g3cf8jE1favZ1jlMHPMFf0sQT1ECwkuwsGHOM9xsCOXmyAO7RCjgjfnRA
z7fmhCnCRyttI/9doGEb2teNrwDGH+YGt/c86gE6gK4lIH5AFM6T3qmXx14wIpdk
ttCDQnasC1Xxtlzt8l2rQSRxSFLJ8BLnPWZl0qq7fPzwInE/oaf9GcCNTSVTkCqu
IgKUcL/tQDA1CJX5W7x4Xj3lajnrzlk00xXJBOtpJDudcMy9PINcj8bCFDN3XNLM
WBrQkkysHbZT0MjU1VHkjVHF+0jCWZjjLWxBnVXEpHpXX8Lw1Y70QBcpOYCGmD1A
XbWo0b+YYgrbCpVDAX9KQKWWr55Crpt3NmI/K3Xo6DoGgVYG9VVo4paukIAFa0wd
8z6q/noFnYk7VNpgAHg4+QZXT4gtnQEJbULQ6oWueXh7SyRZCzS2FH8OxKUJW+rD
tQc5QmINYfBmhutSfZ8I
=TGmj
-----END PGP SIGNATURE-----


More information about the Rpm-maint mailing list