Skip to content

Commit 1513312

Browse files
TheAssassinprobonopd
authored andcommitted
Revert root authentication stuff (AppImageCommunity#3)
* Revert "Try pkexec" This reverts commit 0073974. * Revert "Port root authentication from AppImage/AppImageKit#364" This reverts commit 1ffe5aa.
1 parent 5a23987 commit 1513312

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

main.vala

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,6 @@ static HeaderBar header_bar; // Too new to assume it is there?
88

99
static string selected_file;
1010

11-
static string root(){
12-
13-
var a = Posix.system("pkexec --disable-internal-agent echo hello to appimages");
14-
if (a == 32256){
15-
return "false";
16-
}
17-
else{
18-
return "true";
19-
}
20-
21-
}
22-
static void root_run(){
23-
if(root() == "false"){
24-
Posix.exit(0);
25-
}
26-
}
27-
2811
/* Open file */
2912
static void open_file(string filename) {
3013
selected_file = filename;
@@ -63,7 +46,6 @@ static void on_about_clicked() {
6346
}
6447

6548
static void main (string[] args) {
66-
root_run();
6749
init (ref args);
6850
if(args.length > 1){
6951
open_file(args[1]);

progress.vala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ public class ProgressWindow : Window {
103103
int extra_args = 0;
104104

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

110110
string[] spawn_env = Environ.get ();
111111
int standard_error;

0 commit comments

Comments
 (0)