termux-packages/packages/dpkg/dbmodify_dont_require_root.patch
Fredrik Fornwall 59f0d218a6 Initial push
2015-06-13 01:03:31 +02:00

15 lines
568 B
Diff

diff -u -r ../dpkg-1.17.6/lib/dpkg/dbmodify.c ./lib/dpkg/dbmodify.c
--- ../dpkg-1.17.6/lib/dpkg/dbmodify.c 2013-12-14 06:36:07.000000000 +0100
+++ ./lib/dpkg/dbmodify.c 2014-02-25 18:12:15.000000000 +0100
@@ -253,8 +253,10 @@
switch (readwritereq) {
case msdbrw_needsuperuser:
case msdbrw_needsuperuserlockonly:
+#ifndef __ANDROID__
if (getuid() || geteuid())
ohshit(_("requested operation requires superuser privilege"));
+#endif
/* Fall through. */
case msdbrw_write: case msdbrw_writeifposs:
if (access(dpkg_db_get_dir(), W_OK)) {