if (success) {
if (CheckTokenMembership(NULL, adminGroup, &success)) {
if (!success) {
- fprintf(stderr, "Error: must be run as administrator");
+ fprintf(stderr, "Error: must be run as administrator\n");
exit(1);
} else {
return;
FreeSid(adminGroup);
}
- fprintf(stderr, "Warning: failed to check administrator privileges");
+ fprintf(stderr, "Warning: failed to check administrator privileges\n");
}
#else
void require_admin()
{
if (getuid() != 0) {
- fprintf(stderr, "Error: must be run as root");
+ fprintf(stderr, "Error: must be run as root\n");
exit(1);
}
}