Skip to content

Commit

Permalink
Revert root authentication stuff (#3)
Browse files Browse the repository at this point in the history
* Revert "Try pkexec"

This reverts commit 0073974.

* Revert "Port root authentication from AppImage/AppImageKit#364"

This reverts commit 1ffe5aa.
  • Loading branch information
TheAssassin authored and probonopd committed Apr 2, 2017
1 parent 5a23987 commit 1513312
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
18 changes: 0 additions & 18 deletions main.vala
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,6 @@ static HeaderBar header_bar; // Too new to assume it is there?

static string selected_file;

static string root(){

var a = Posix.system("pkexec --disable-internal-agent echo hello to appimages");
if (a == 32256){
return "false";
}
else{
return "true";
}

}
static void root_run(){
if(root() == "false"){
Posix.exit(0);
}
}

/* Open file */
static void open_file(string filename) {
selected_file = filename;
Expand Down Expand Up @@ -63,7 +46,6 @@ static void on_about_clicked() {
}

static void main (string[] args) {
root_run();
init (ref args);
if(args.length > 1){
open_file(args[1]);
Expand Down
6 changes: 3 additions & 3 deletions progress.vala
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ public class ProgressWindow : Window {
int extra_args = 0;

string[] spawn_args = new string[8 + files_to_be_updated.length + extra_args];
spawn_args[0] = "pkexec";
spawn_args[1] = Environment.get_variable ("APPDIR").concat("/usr/bin/appimageupdate", null);
spawn_args[2] = this.file_name;

spawn_args[0] = "appimageupdate";
spawn_args[1] = this.file_name;

string[] spawn_env = Environ.get ();
int standard_error;
Expand Down

0 comments on commit 1513312

Please sign in to comment.