File tree 2 files changed +5
-14
lines changed 2 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,6 @@ cargo build --release
109
109
This produces a binary ` target/release/sudo ` . However, this binary must have
110
110
the setuid flag set and must be owned by the root user in order to provide any
111
111
useful functionality. Consult your operating system manual for details.
112
- On operating systems other than Linux we also require an environment variable
113
- ` SUDO_RS_IS_UNSTABLE ` to be set, and it must have the value
114
- ` I accept that my system may break unexpectedly ` . This because we are in an
115
- early stage of supporting non-Linux OSes. If you are unsure about how to set
116
- this up, then the current version of sudo is not intended for you.
117
112
118
113
Sudo-rs then also needs the configuration files; please follow the installation
119
114
suggestions in the previous section.
Original file line number Diff line number Diff line change @@ -23,22 +23,17 @@ mod env;
23
23
mod pam;
24
24
mod pipeline;
25
25
26
- /// show warning message when SUDO_RS_IS_UNSTABLE is not set to the appropriate value
26
+ # [ cfg_attr ( not( feature = "dev" ) , allow ( dead_code ) ) ]
27
27
fn unstable_warning ( ) {
28
- if cfg ! ( all( target_os = "linux" , not( feature = "dev" ) ) ) {
29
- return ;
30
- }
31
-
32
28
let check_var = std:: env:: var ( "SUDO_RS_IS_UNSTABLE" ) . unwrap_or_else ( |_| "" . to_string ( ) ) ;
33
29
34
30
if check_var != "I accept that my system may break unexpectedly" {
35
31
eprintln_ignore_io_error ! (
36
32
"WARNING!
37
- Sudo-rs is in the early stages of supporting OSes other than Linux and could potentially
33
+ Sudo-rs is compiled with development logs on, which means it is less secure and could potentially
38
34
break your system. We recommend that you do not run this on any production environment.
39
- To turn off this warning and start using sudo-rs set the environment variable
40
- SUDO_RS_IS_UNSTABLE to the value `I accept that my system may break unexpectedly`. If
41
- you are unsure how to do this then this software is not suited for you at this time."
35
+ To turn off this warning and use sudo-rs you need to set the environment variable
36
+ SUDO_RS_IS_UNSTABLE to the value `I accept that my system may break unexpectedly`."
42
37
) ;
43
38
44
39
std:: process:: exit ( 1 ) ;
@@ -107,6 +102,7 @@ fn sudo_process() -> Result<(), Error> {
107
102
eprintln_ignore_io_error ! ( "{}" , help:: USAGE_MSG ) ;
108
103
std:: process:: exit ( 1 ) ;
109
104
} else {
105
+ #[ cfg( feature = "dev" ) ]
110
106
unstable_warning ( ) ;
111
107
112
108
pipeline:: run ( options)
You can’t perform that action at this time.
0 commit comments