Updated sus.c
This commit is contained in:
parent
681673c791
commit
27156191f1
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
|||||||
build:
|
build:
|
||||||
cc -lcrypt sus.c -o sus
|
cc -lcrypt -I. sus.c -o sus
|
||||||
|
|
||||||
all: build install
|
all: build install
|
||||||
|
|
||||||
|
7
sus.c
7
sus.c
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#define MAX_PASSWORD 3
|
#define MAX_PASSWORD 3
|
||||||
|
|
||||||
// TODO: Add group check
|
// TODO: Add pipe support
|
||||||
|
|
||||||
void get_password(char *password);
|
void get_password(char *password);
|
||||||
|
|
||||||
@ -48,6 +48,9 @@ void intHandler(int dummy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
|
struct rule *rule;
|
||||||
|
char **envp;
|
||||||
|
|
||||||
if (CheckIfInGroup("wheel") != 1) {
|
if (CheckIfInGroup("wheel") != 1) {
|
||||||
puts("ERROR: Not in the wheel group.");
|
puts("ERROR: Not in the wheel group.");
|
||||||
return 0;
|
return 0;
|
||||||
@ -161,7 +164,7 @@ void PrintHelp() {
|
|||||||
int AskPassword() {
|
int AskPassword() {
|
||||||
for (int i=0; i<MAX_PASSWORD; i++) {
|
for (int i=0; i<MAX_PASSWORD; i++) {
|
||||||
printf("Password: ");
|
printf("Password: ");
|
||||||
char password[256];
|
char password[BUFSIZ];
|
||||||
get_password(password);
|
get_password(password);
|
||||||
|
|
||||||
int res = CheckPassword(password);
|
int res = CheckPassword(password);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user