You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
716 B
22 lines
716 B
diff -u -r ../busybox-1.26.2/networking/hostname.c ./networking/hostname.c
|
|
--- ../busybox-1.26.2/networking/hostname.c 2016-12-10 18:46:36.000000000 +0100
|
|
+++ ./networking/hostname.c 2017-07-07 00:19:07.993535998 +0200
|
|
@@ -58,11 +58,18 @@
|
|
}
|
|
if (ENABLE_FEATURE_CLEAN_UP)
|
|
config_close(parser);
|
|
+#ifdef __ANDROID__
|
|
+ } else {
|
|
+ /* sethostname() is not available on Android pre android-23 and not allowed anyway. */
|
|
+ bb_error_msg_and_die("can't set hostname: Operation not permitted");
|
|
+ }
|
|
+#else
|
|
} else if (sethostname(s, strlen(s))) {
|
|
// if (errno == EPERM)
|
|
// bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
|
|
bb_perror_msg_and_die("sethostname");
|
|
}
|
|
+#endif
|
|
}
|
|
|
|
/* Manpage circa 2009:
|
|
|