core: remove unused function nm_main_utils_ensure_root()

This commit is contained in:
Thomas Haller 2022-01-18 17:14:23 +01:00
parent 604260c6ea
commit f755c7b1db
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 0 additions and 11 deletions

View file

@ -209,15 +209,6 @@ nm_main_utils_ensure_not_running_pidfile(const char *pidfile)
}
}
void
nm_main_utils_ensure_root()
{
if (getuid() != 0) {
fprintf(stderr, _("You must be root to run %s!\n"), g_get_prgname() ?: "");
exit(1);
}
}
uid_t nm_uid;
/**
* nm_main_utils_get_nm_uid:

View file

@ -6,8 +6,6 @@
#ifndef __MAIN_UTILS_H__
#define __MAIN_UTILS_H__
void nm_main_utils_ensure_root(void);
uid_t nm_main_utils_get_nm_uid(void);
gid_t nm_main_utils_get_nm_gid(void);