termux-packages/packages/dpkg/dbmodify_dont_require_root....

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)) {