summaryrefslogtreecommitdiff
path: root/su
AgeCommit message (Collapse)Author
2021-10-19Migrate su to Soong with xbinTrevor Radcliffe
Tried to migrate su to Soong and put it in bin, and that broke stuff. This time, we're leaving it in xbin to avoid breaking those things. Fixes: 202384734 Test: Run tests Test: Confirm that su was placed in xbin Change-Id: I33333de70d69b79da2072da4e76a08d7a05d1e59
2021-10-18Revert "Migrate su to Soong"Trevor Radcliffe
This reverts commit 32b779eb50cb25137c12f46052efa5622000d2e3. Reason for revert: Broke tests Change-Id: Iffb2e4e68dc038a5e4819773188c2bc89c4d41e4
2021-10-18Migrate su to SoongTrevor Radcliffe
Convert system/extras/su/Android.mk to Android.bp Fixes: 202384734 Test: cts Test: Treehugger Change-Id: I6d7e64ee1607061b0e7bcb0b71482401eaba2758
2021-05-07Revert "Convert su/Android.mk to Android.bp"Nicolas Geoffray
This reverts commit 2ef7e585f255d320af5d9180aa58662f4a8a8f5f. Reason for revert: Checking for culprit of b/187481237 Change-Id: I636382794fe35c967f62e19abda2eb8ee5b76bb3
2021-05-03Convert su/Android.mk to Android.bpYuntao Xu
Convert the Make file to a Soong one Bug: 186677673 Test: compared the results built by Make and Soong Test: TreeHugger Change-Id: I9e44ea4c59f5372bc7134d6a281f6a3589575d42
2021-02-19[LSC] Add LOCAL_LICENSE_KINDS to system/extrasBob Badour
Added SPDX-license-identifier-Apache-2.0 to: alloc-stress/Android.bp app-launcher/Android.bp boot_control_copy/Android.bp bootctl/Android.bp boottime_tools/bootanalyze/stressfs/Android.bp boottime_tools/bootio/Android.bp brillo_config/Android.mk checkpoint_gc/Android.bp cppreopts/Android.bp crypto-perf/Android.bp ext4_utils/Android.bp ext4_utils/Android.mk f2fs_utils/Android.bp ioblame/Android.bp ioshark/Android.bp iotop/Android.bp kexec_tools/Android.bp latencytop/Android.bp libfec/Android.bp libfec/test/Android.bp libfscrypt/Android.bp libfscrypt/tests/Android.bp libjsonpb/parse/Android.bp libjsonpb/verify/Android.bp memory_replay/Android.bp memtrack/Android.bp mmap-perf/Android.bp module_ndk_libs/libnativehelper/Android.bp multinetwork/Android.bp pagecache/Android.bp partition_tools/Android.bp partition_tools/aidl/Android.bp perf2cfg/Android.bp postinst/Android.bp preopt2cachename/Android.bp profcollectd/Android.bp profcollectd/libprofcollectd/Android.bp profcollectd/libprofcollectd/bindings/libflags/Android.bp pssbench/Android.mk puncture_fs/Android.bp runconuid/Android.bp sane_schedstat/Android.bp showslab/Android.bp simpleperf/Android.bp simpleperf/runtest/Android.bp simpleperf/scripts/inferno/Android.bp simpleperf/simpleperf_app_runner/Android.bp slideshow/Android.mk sound/Android.bp squashfs_utils/Android.bp su/Android.mk taskstats/Android.bp tests/Android.bp tests/audio/alsa/Android.bp tests/binder/benchmarks/Android.bp tests/bootloader/Android.mk tests/cpueater/Android.bp tests/crypto/Android.bp tests/directiotest/Android.bp tests/ext4/Android.mk tests/framebuffer/Android.bp tests/fstest/Android.bp tests/icachetest/Android.bp tests/iptables/qtaguid/Android.bp tests/kernel.config/Android.mk tests/lib/Android.bp tests/lib/testUtil/Android.bp tests/memeater/Android.mk tests/pagingtest/Android.mk tests/pftest/Android.bp tests/schedtest/Android.bp tests/storage/Android.bp tests/suspend_stress/Android.bp tests/tcp_nuke_addr/Android.bp tests/timetest/Android.bp tests/uevents/Android.bp toolchain-extras/Android.bp vbmeta_tools/Android.bp verity/Android.bp verity/fec/Android.bp zram-perf/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: cpustats/Android.bp Added SPDX-license-identifier-BSD to: ANRdaemon/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Ia559848af903a7b6746d9b12b7de8b83bc57f99d
2021-02-16Revert "[LSC] Add LOCAL_LICENSE_KINDS to system/extras"Bob Badour
This reverts commit 044d055c842a5750359ed71dfe50a6a4bf5f4cc3. Reason for revert: Needs to run as multiple roots. Change-Id: I8e06e7eb19e0f634f52fbd8a1c6662f43e347dd5
2021-02-12[LSC] Add LOCAL_LICENSE_KINDS to system/extrasBob Badour
Added SPDX-license-identifier-Apache-2.0 to: boot_control_copy/Android.bp bootctl/Android.bp boottime_tools/bootanalyze/stressfs/Android.bp boottime_tools/bootio/Android.bp checkpoint_gc/Android.bp cppreopts/Android.bp crypto-perf/Android.bp ext4_utils/Android.bp ext4_utils/Android.mk f2fs_utils/Android.bp ioshark/Android.bp iotop/Android.bp kexec_tools/Android.bp latencytop/Android.bp libfec/Android.bp libfec/test/Android.bp libfscrypt/Android.bp libfscrypt/tests/Android.bp libjsonpb/parse/Android.bp libjsonpb/verify/Android.bp memory_replay/Android.bp memtrack/Android.bp mmap-perf/Android.bp module_ndk_libs/libnativehelper/Android.bp multinetwork/Android.bp pagecache/Android.bp partition_tools/Android.bp perf2cfg/Android.bp postinst/Android.bp preopt2cachename/Android.bp profcollectd/Android.bp profcollectd/libprofcollectd/Android.bp profcollectd/libprofcollectd/bindings/libflags/Android.bp puncture_fs/Android.bp runconuid/Android.bp sane_schedstat/Android.bp showslab/Android.bp simpleperf/Android.bp simpleperf/runtest/Android.bp simpleperf/scripts/inferno/Android.bp simpleperf/simpleperf_app_runner/Android.bp slideshow/Android.mk sound/Android.bp squashfs_utils/Android.bp su/Android.mk taskstats/Android.bp tests/Android.bp tests/audio/alsa/Android.bp tests/binder/benchmarks/Android.bp tests/bootloader/Android.mk tests/cpueater/Android.bp tests/crypto/Android.bp tests/directiotest/Android.bp tests/ext4/Android.mk tests/framebuffer/Android.bp tests/fstest/Android.bp tests/icachetest/Android.bp tests/iptables/qtaguid/Android.bp tests/kernel.config/Android.mk tests/lib/Android.bp tests/lib/testUtil/Android.bp tests/memeater/Android.mk tests/pagingtest/Android.mk tests/pftest/Android.bp tests/schedtest/Android.bp tests/storage/Android.bp tests/suspend_stress/Android.bp tests/tcp_nuke_addr/Android.bp tests/timetest/Android.bp tests/uevents/Android.bp toolchain-extras/Android.bp vbmeta_tools/Android.bp verity/Android.bp verity/fec/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: cpustats/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_notice to: Android.bp Added SPDX-license-identifier-BSD to: ANRdaemon/Android.bp Added legacy_notice to: alloc-stress/Android.bp app-launcher/Android.bp brillo_config/Android.mk ioblame/Android.bp partition_tools/aidl/Android.bp pssbench/Android.mk zram-perf/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Ie7c022a4d7f828a89d0cda663684a497af37006e
2020-09-17Use libcutils_headers for android_filesystem_config.hTom Cherry
Test: build Change-Id: If67a5e7dd2500a6adca4f0c3892e4c3441e5c990
2019-02-20su: fix the command line syntax.Elliott Hughes
Test: `su --help` Change-Id: I08f2e897b6d472f1748574aa162555ac8adfc05e
2019-01-18Remove LOCAL_MODULE_TAGS := debugDan Willemsen
Instead, su has been added to PRODUCT_PACKAGES_DEBUG in build/make/target/product/base_system.mk memeater didn't appear to have anything that needed it in every eng build, so I've just removed the tag. If it's necessary, add it to the list above. I removed LOCAL_MODULE_TAGS and LOCAL_MODULE_PATH from libsimpleperf, as static libraries are not impacted by either setting. Test: treehugger Change-Id: Iec2610bdb4452f955b0baf5d817e99a2ebf15594
2017-09-07<stdbool.h> not necessary in C++.Elliott Hughes
Bug: N/A Test: builds Change-Id: I02c2619bd5ddcabf19b0fea6845e2ffbe9c9edf6
2016-10-08Rely on the platform -std default.Elliott Hughes
Bug: http://b/32019064 Test: builds Change-Id: I301b223df84ffdea7c93b5c735c859abcc5bb220
2016-03-09su: Segmentation Fault on unknown numerical uidsMark Salyzyn
(cherry pick from commit 45948f910c69d354cc3f7e81631445d83ebadc3d) e.g. su 2999,2999,2999 echo hello Segmentation Fault return from getpwuid is NULL. KISS we opt to unset LOGNAME and USER Change-Id: I7e7eddacfd6857f83482727eb5ec5c51b9170039
2015-03-26Special-case "su --help".Elliott Hughes
Rather than force people to move from "su system echo -n hello", where the -n gets interpreted by getopt_long(3), to "su system -- echo -n hello", just hard-code the recognition of --help. This seems easier than moving people over to the more traditional "su -c 'echo -n hello'" style. Bug: 19948740 Change-Id: I248269343b452a381effb7b8926ac7f2522b941b
2015-03-17su should reset PATH, IFS, LOGNAME, and USER.Elliott Hughes
Also add -h and --help while we're here (since all the toybox commands carry their own documentation, and our su isn't much like the real su). Bug: 19647373 Bug: 19564110 Change-Id: If2e6117b6701dcac03b5831f251e60a272bf0d61
2015-03-17Fix su.Elliott Hughes
Manually NULL-terminate the arguments array instead of trying to use memset. This was accidentally working on LP64 but fails reliably on LP32. Change-Id: Ic2ecb8ed2019f260c720f27dbd018a55e7cfa569
2015-03-14Clean up su.Elliott Hughes
Stop building su as a static executable. We don't rely on the getuid implementation for security, so we have nothing to fear from the dynamic linker. Add some missing error checking and improve error reporting. Remove various special cases that can all be rolled into the general case. Bug: 19647373 Change-Id: I2689b8957a89da1f3be571fcdc966b1084efca9a
2013-01-10su: support fine grained setting of gid and groupsJP Abgrall
To allow some tests to quickly check if some group membership handling are correctly done, the tests need to run as a proc belonging to multiple groups. su would normally only allow setting uid=gid=something. This changes adds setting the gid separately from the uid and setting the groups: su [uid[,gid[,group1]...]] [cmd]] E.g. su su shell ls /data su 1000,shell,net_bw_acct,net_bw_stats id will return uid=1000(system) gid=2000(shell) groups=3006(net_bw_stats),3007(net_bw_acct) Change-Id: I713454bf14c3bc3ece93aec3729bda102542d1b1
2012-04-02su: do uid check earlier.Nick Kralevich
Change-Id: Ied4894019d2b0021e7f727569ff85650d209e5da
2009-03-18auto import from //branches/cupcake_rel/...@140373The Android Open Source Project
2009-03-09auto import from //branches/cupcake/...@137197The Android Open Source Project
2009-03-03auto import from //depot/cupcake/@135843The Android Open Source Project
2009-03-03auto import from //depot/cupcake/@135843The Android Open Source Project
2008-12-17Code drop from //branches/cupcake/...@124589The Android Open Source Project
2008-10-21Initial Contributionandroid-1.0release-1.0cdma-importThe Android Open Source Project