Bug#765569: please add this script to use su instead of sudo (or the reverse) (e.g. for pdebuild)

Tanguy Ortolo tanguy+debian at ortolo.eu
Thu Oct 16 10:14:54 UTC 2014


Package: devscripts
Version: 2.12.6+deb7u2
Severity: wishlist
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hello,

I have written a script that can be used to replace sudo by using su
instead, or to replace su by using sudo instead.

This is useful for commands such as pdebuild, which normally use sudo,
can be configured to use another command, but that will then use it like
sudo (sudo-like-command command-to-run-as-root), so su cannot be used
instead (as it is meant to be used as su -c "command-to-run-as-root").

Since my scripts are not specific to pdebuild, but can be used for other
purposes, I suggest they are added to devscripts. Attached is a tarball
with: the scripts (in fact, a single one with a symlink, which acts
differently depending on how it is called), a manpage (in DocBook, and
compiled in Troff), and the Makefile to compile this manpage to Troff.

For convenience, I am also attaching the main script itself, so it can
be reviewed without having to extract the tarball.

Librement,

- -- 
 ,--.
: /` )   ن Tanguy Ortolo    <xmpp:tanguy at ortolo.eu>
| `-'    Debian Developer   <irc://irc.oftc.net/Tanguy>
 \_

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCgAGBQJUP5qaAAoJEOryzVHFAGgZ5coP/28jueFraUOfrE2am0HAcHlw
Qx4Uoejx2NCtkt8qVAGUBdt9RQO9vbhelfgfR125CbDZsbYOym/oCq7kPjpi4VQU
L7Db9bV66z9yrvryw/7Ujx+arstWE3w1d9mUG/yjAe5rQUOs3eVp+mY27iueP41B
SRvxG7s22KrKZbkR95kRDC3dqS2XwA1rw6h+Yuita1ZeB62g9mAvxxCxZEHSBAlV
5t0uQZAfNzBDnGZH1WH1yfoX+rgnUp3B0u2dy3lgx+3Kgtd1B9moS9vPiJllLj0f
U+ojzmSK1Y7wDHfGVIng1sxXiYPE2CmH4IU4ClYXNS8rdEVO4QzOKW8QmDOVvlWO
XkDsWvsSx1VbcNG+g2m6AwDTUriCMqD9h4HXbJTMJoDsF/SWaejhaj7J6i9hg5h7
qFr+kT8AYW93AH1qF+Y+wP2nUghhHi9vwtIyhMxvJ3aWJW0yc2C5GE6TZ/2KMsCt
5TKmSa+o2HRaEmekWyHAAcNfezGWh6uAtx9PV9yVI87oeANqRCDC+kFTPEVA4e5j
t0csF5rFKbZ9VWVsgZP7ueDhx7SiGuHmU6ImQq+Gw6nq05hbBj5K81MG5M0/aBkS
QQ8CqThJQMSpVQDbBZrlYMhAIZqseOIKLqhxMRJy8lXNKudji9f2zanPhhWDvIvp
6Xtl84d79YWkLbvbQnww
=GBV/
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sudo-su.tar.xz
Type: application/x-xz
Size: 4756 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20141016/2eaf3036/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sudo-su
Type: text/x-shellscript
Size: 4103 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20141016/2eaf3036/attachment-0003.bin>


More information about the devscripts-devel mailing list