/system/netd/server/ |
D | NdcDispatcher.cpp | 53 #define PARSE_INT_RETURN_IF_FAIL(cli, label, intLabel, errMsg, addErrno) \ argument 57 (cli)->sendMsg(ResponseCode::OperationFailed, (errMsg), (addErrno)); \ 62 #define PARSE_UINT_RETURN_IF_FAIL(cli, label, intLabel, errMsg, addErrno) \ argument 66 (cli)->sendMsg(ResponseCode::OperationFailed, (errMsg), (addErrno)); \ 166 int NdcDispatcher::InterfaceCmd::runCommand(NdcClient* cli, int argc, char** argv) const { in runCommand() argument 168 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); in runCommand() 178 cli->sendMsg(ResponseCode::OperationFailed, "Failed to get interface list", true); in runCommand() 182 cli->sendMsg(ResponseCode::InterfaceListResult, iface.c_str(), false); in runCommand() 185 cli->sendMsg(ResponseCode::CommandOkay, "Interface list completed", false); in runCommand() 192 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); in runCommand() [all …]
|
D | NdcDispatcher.h | 84 int runCommand(NdcClient* cli, int argc, char** argv) const; 91 int runCommand(NdcClient* cli, int argc, char** argv) const; 98 int runCommand(NdcClient* cli, int argc, char** argv) const; 105 int runCommand(NdcClient* cli, int argc, char** argv) const; 112 int runCommand(NdcClient* cli, int argc, char** argv) const; 115 void sendGenericOkFail(NdcClient* cli, int cond) const; 116 void sendGenericOpFailed(NdcClient* cli, const char* errMsg) const; 117 void sendGenericSyntaxError(NdcClient* cli, const char* usageMsg) const; 124 int runCommand(NdcClient* cli, int argc, char** argv) const; 131 int runCommand(NdcClient* cli, int argc, char** argv) const; [all …]
|
/system/logging/logd/ |
D | CommandListener.cpp | 69 static int LogIdCommand(SocketClient* cli, int argc, char** argv, F&& function) { in LogIdCommand() argument 72 cli->sendMsg("Missing Argument"); in LogIdCommand() 79 cli->sendMsg("Range Error"); in LogIdCommand() 87 int CommandListener::ClearCmd::runCommand(SocketClient* cli, int argc, char** argv) { in runCommand() argument 88 uid_t uid = cli->getUid(); in runCommand() 89 if (clientHasLogCredentials(cli)) { in runCommand() 93 return LogIdCommand(cli, argc, argv, [&](log_id_t id) { in runCommand() 94 cli->sendMsg(buf()->Clear(id, uid) ? "success" : "busy"); in runCommand() 99 static int LogSizeCommand(SocketClient* cli, int argc, char** argv, F&& size_function) { in LogSizeCommand() argument 100 return LogIdCommand(cli, argc, argv, [&](log_id_t log_id) { in LogSizeCommand() [all …]
|
D | LogReader.cpp | 107 bool LogReader::onDataAvailable(SocketClient* cli) { in onDataAvailable() argument 116 int len = read(cli->getSocket(), buffer, sizeof(buffer) - 1); in onDataAvailable() 118 DoSocketDelete(cli); in onDataAvailable() 124 if (DoSocketDelete(cli)) { in onDataAvailable() 188 bool privileged = clientHasLogCredentials(cli); in onDataAvailable() 189 bool can_read_security = CanReadSecurityLogs(cli); in onDataAvailable() 194 std::unique_ptr<LogWriter> socket_log_writer(new SocketLogWriter(this, cli, privileged)); in onDataAvailable() 236 cli->getUid(), cli->getGid(), cli->getPid(), nonBlock ? 'n' : 'b', tail, logMask, in onDataAvailable() 248 cli->incRef(); in onDataAvailable() 250 entry->set_pending_reader_thread_key(cli->getUid(), cli->getGid(), cli->getPid(), in onDataAvailable() [all …]
|
D | LogPermissions.cpp | 145 bool clientHasLogCredentials(SocketClient* cli) { in clientHasLogCredentials() argument 146 if (UserIsPrivileged(cli->getUid()) || UserIsPrivileged(cli->getGid())) { in clientHasLogCredentials() 158 int result = getsockopt(cli->getSocket(), SOL_SOCKET, SO_PEERGROUPS, supplemental_groups.data(), in clientHasLogCredentials() 163 return clientHasLogCredentials(cli->getUid(), cli->getGid(), cli->getPid()); in clientHasLogCredentials() 167 result = getsockopt(cli->getSocket(), SOL_SOCKET, SO_PEERGROUPS, supplemental_groups.data(), in clientHasLogCredentials() 172 return clientHasLogCredentials(cli->getUid(), cli->getGid(), cli->getPid()); in clientHasLogCredentials() 186 bool clientIsExemptedFromUserConsent(SocketClient* cli) { in clientIsExemptedFromUserConsent() argument 187 return cli->getUid() < AID_APP_START; in clientIsExemptedFromUserConsent()
|
D | LogPermissions.h | 24 bool clientHasLogCredentials(SocketClient* cli); 26 bool clientIsExemptedFromUserConsent(SocketClient* cli);
|
D | LogReader.h | 30 virtual bool onDataAvailable(SocketClient* cli); 35 bool DoSocketDelete(SocketClient* cli);
|
D | TrustyLog.cpp | 73 bool TrustyLog::onDataAvailable(SocketClient* cli) { in onDataAvailable() argument 81 read(cli->getSocket(), buffer + len, sizeof(buffer) - 1 - len)); in onDataAvailable()
|
D | TrustyLog.h | 37 virtual bool onDataAvailable(SocketClient* cli);
|
D | LogAudit.h | 38 virtual bool onDataAvailable(SocketClient* cli);
|
D | LogKlog.h | 49 virtual bool onDataAvailable(SocketClient* cli);
|
D | LogAudit.cpp | 82 bool LogAudit::onDataAvailable(SocketClient* cli) { in onDataAvailable() argument 94 if (audit_get_reply(cli->getSocket(), &rep, GET_REPLY_BLOCKING, 0) < 0) { in onDataAvailable()
|
D | LogKlog.cpp | 220 bool LogKlog::onDataAvailable(SocketClient* cli) { in onDataAvailable() argument 234 read(cli->getSocket(), buffer + len, sizeof(buffer) - 1 - len); in onDataAvailable()
|
/system/security/keystore/tests/ |
D | list_auth_bound_keys_test.sh | 30 function cli { function 39 cli $USER1_ID "delete --name=no_auth_key" || true 40 cli $USER1_ID "generate --name=no_auth_key" 41 cli $USER2_ID "delete --name=auth_key" || true 42 if ! cli $USER2_ID "generate --name=auth_key --auth_bound"; then 49 if cli $USER2_ID list-apps-with-keys; then 55 if cli $ROOT_ID "list-apps-with-keys"; then 71 done <<< $(cli $SYSTEM_ID "list-apps-with-keys")
|
/system/core/libsysutils/src/ |
D | FrameworkListener.cpp | 94 void FrameworkListener::dispatchCommand(SocketClient *cli, char *data) { in dispatchCommand() argument 128 cli->sendMsg(500, "Unsupported escape sequence", false); in dispatchCommand() 154 cli->sendMsg(500, "Invalid sequence number", false); in dispatchCommand() 157 cli->setCmdNum(cmdNum); in dispatchCommand() 182 cli->sendMsg(500, "Unclosed quotes error", false); in dispatchCommand() 194 if (c->runCommand(cli, argc, argv)) { in dispatchCommand() 200 cli->sendMsg(500, "Command not recognized", false); in dispatchCommand() 208 cli->sendMsg(500, "Command too long", false); in dispatchCommand()
|
D | NetlinkListener.cpp | 46 bool NetlinkListener::onDataAvailable(SocketClient *cli) in onDataAvailable() argument 48 int socket = cli->getSocket(); in onDataAvailable()
|
D | SocketListener_test.cpp | 105 int runCommand(SocketClient* cli, int argc, char** argv) { in runCommand() argument 108 cli->sendMsg(42, reply.c_str(), /*addErrno=*/false, /*useCmdNum=*/false); in runCommand()
|
/system/libziparchive/ |
D | run-ziptool-tests-on-android.sh | 7 adb push cli-tests/ "$test_dir" 15 exec adb shell "$dash_t" "${test_dir}"/cli-test "${test_dir}"/cli-tests/*.test
|
D | Android.bp | 292 data: ["cli-tests/**/*"], 293 target_required: ["cli-test", "ziptool"], 294 data_device_bins: ["cli-test"],
|
/system/tools/xsdc/src/main/java/com/android/xsdc/ |
D | Main.java | 32 import org.apache.commons.cli.CommandLine; 33 import org.apache.commons.cli.CommandLineParser; 34 import org.apache.commons.cli.GnuParser; 35 import org.apache.commons.cli.HelpFormatter; 36 import org.apache.commons.cli.Option; 37 import org.apache.commons.cli.OptionBuilder; 38 import org.apache.commons.cli.OptionGroup; 39 import org.apache.commons.cli.Options; 40 import org.apache.commons.cli.ParseException;
|
/system/core/cli-test/ |
D | Android.bp | 6 name: "cli-test", 8 srcs: ["cli-test.cpp"],
|
D | README.md | 1 # cli-test 5 `cli-test` makes integration testing of command-line tools easier.
|
/system/tools/xsdc/ |
D | Android.bp | 11 "commons-cli-1.2", 22 "commons-cli-1.2",
|
/system/security/prng_seeder/src/ |
D | main.rs | 72 let cli = Cli::try_parse()?; in setup() localVariable 76 let listener = match cli.socket { in setup() 81 let hwrng = std::fs::File::open(&cli.source) in setup() 82 .with_context(|| format!("Unable to open hwrng {}", cli.source.display()))?; in setup()
|
/system/core/libsysutils/include/sysutils/ |
D | NetlinkListener.h | 45 virtual bool onDataAvailable(SocketClient *cli);
|