erikberglund / SwiftPrivilegedHelper

Example application using a privileged helper tool with authentication in an unsandboxed application written in Swift
MIT License
180 stars 33 forks source link

Command Help #8

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hi can you tell me what exactly command you execute , bcoz i tried either with auth or not out put is same (see screenshot)

if you tell me exact command so i can verify in terminal as well as in app

screen shot 2018-10-05 at 6 28 37 pm

erikberglund commented 5 years ago

Yes its the command at the path in the text above the text field: /bin/ls

And that is just to show an example for a command to list files in a location.

erikberglund commented 5 years ago

The with auth or not is to show that you can run commands as root with or without an auth prompt

ghost commented 5 years ago

i mean if i run sudo ls Last login: Fri Oct 5 18:19:36 on ttys003

Deepaks-iMac:~ deepak$ sudo ls
Password:
.DS_Store           .lldb
.Trash              .mono
.android            .profile
.bash_history           .stCommitMsg
.bash_sessions          Applications
.cache              Desktop
.cocoapods          Documents
.config             Downloads
.emulator_console_auth_token    Library
.gitconfig          Movies
.gitflow_export         Music
.gitignore_global       Pictures
.gradle             Public
.hgignore_global        resource
.keystore

when not sudo

Deepaks-iMac:~ deepak$ ls
Applications    Documents   Library     Music       Public
Desktop     Downloads   Movies      Pictures    resource

why this type of output in app ?

erikberglund commented 5 years ago

I can change the command if it is confusing, but if you get an exit status of 0 it works.

ghost commented 5 years ago

I can change the command if it is confusing, but if you get an exit status of 0 it works.

great

but i'm not able to get difference between auth and non auth execution thats what i feel

erikberglund commented 5 years ago

That is correct, its running the same command, this is an example project to show how you can use helper and if you want to run stuff without a prompt you can and if you want to prompt for acces you can do that too. The difference is the auth prompt.

ghost commented 5 years ago

you are right

it would be great if you see difference

like i have a project needs to be updated to latest swift and helper tool , if your project do what i said then i don't need to worry about it just need to focus on using it in and updating my project to swift , otherwise i have to first focus on this project is working or have bug etc then can move to other

above is just i feel , you can ignore it

but thank you once again

erikberglund commented 5 years ago

Yes i agree this is not clear. I will update the example to show the difference.

ghost commented 5 years ago

Hi i did different test to sure app is working or not ? result is it's perfect

thank you