pull/2/merge
Graham Mainwaring 2 years ago committed by GitHub
commit bafd001d59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,6 +14,7 @@
#include <errno.h>
#include <string.h>
#include <stdbool.h>
#include <fcntl.h>
#include "namespace.h"
@ -108,6 +109,16 @@ int main(int argc, char *argv[])
return EXIT_OTHER_ERROR;
// allow non-root user to use the ping command
int fd = open("/proc/sys/net/ipv4/ping_group_range", O_WRONLY);
if (fd == -1) {
fprintf(stderr, "Error setting ping_group_range: %s\n", strerror(errno));
usage(argv0, true);
}
dprintf(fd, "0 2147483647\n");
close(fd);
drop_root_privileges();

Loading…
Cancel
Save