mirror of
https://github.com/yarrick/iodine.git
synced 2024-12-01 05:55:12 +00:00
rename check_superuser() to check_privileges()
It's a preparatory commit to reflect upcoming changes in how capabilities are checked under Linux in presence of libcap-ng. No functional change. Signed-off-by: Oleksandr Natalenko <oleksandr@redhat.com>
This commit is contained in:
parent
df49fd6f3d
commit
11dd73a646
@ -103,7 +103,7 @@ int setgroups(int count, int *groups)
|
|||||||
|
|
||||||
#ifndef WINDOWS32
|
#ifndef WINDOWS32
|
||||||
void
|
void
|
||||||
check_superuser(void)
|
check_privileges(void)
|
||||||
{
|
{
|
||||||
if (geteuid() != 0) {
|
if (geteuid() != 0) {
|
||||||
warnx("Run as root and you'll be happy.");
|
warnx("Run as root and you'll be happy.");
|
||||||
|
@ -105,11 +105,11 @@ enum connection {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WINDOWS32
|
#ifdef WINDOWS32
|
||||||
static inline void check_superuser(void)
|
static inline void check_privileges(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void check_superuser(void);
|
void check_privileges(void);
|
||||||
#endif
|
#endif
|
||||||
char *format_addr(struct sockaddr_storage *sockaddr, int sockaddr_len);
|
char *format_addr(struct sockaddr_storage *sockaddr, int sockaddr_len);
|
||||||
int get_addr(char *, int, int, int, struct sockaddr_storage *);
|
int get_addr(char *, int, int, int, struct sockaddr_storage *);
|
||||||
|
@ -279,7 +279,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
check_superuser();
|
check_privileges();
|
||||||
|
|
||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
@ -2519,7 +2519,7 @@ main(int argc, char **argv)
|
|||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
check_superuser();
|
check_privileges();
|
||||||
|
|
||||||
if (argc != 2)
|
if (argc != 2)
|
||||||
usage();
|
usage();
|
||||||
|
Loading…
Reference in New Issue
Block a user