From 8ae4e5513ac180973da1837859a1b78448592dd8 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 12 Sep 2019 09:40:19 -0700 Subject: [PATCH] showauth for other user names --- testApp/utils/showauth.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/testApp/utils/showauth.cpp b/testApp/utils/showauth.cpp index e82d5f8..a537565 100644 --- a/testApp/utils/showauth.cpp +++ b/testApp/utils/showauth.cpp @@ -22,10 +22,13 @@ int main(int argc, char *argv[]) throw std::runtime_error("Unable to determine username"); name[name.size()-1] = '\0'; - std::cout<<"User: "<<(&name[0])<<"\n"; + + const char *user = argc<=1 ? &name[0] : argv[1]; + + std::cout<<"User: "<