Added basic Makefile, updated README and some code fixes.
This commit is contained in:
parent
cd0030370a
commit
7cf30917aa
3 changed files with 13 additions and 4 deletions
9
Makefile
Normal file
9
Makefile
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
all:
|
||||
$(CC) -Werror -lpam -lpam_misc -o checkpw checkpw.c
|
||||
|
||||
clean:
|
||||
rm -f ./checkpw
|
||||
|
||||
install:
|
||||
cp ./checkpw /usr/bin/
|
||||
|
||||
|
|
@ -7,8 +7,8 @@ checkpw is a program that checks the validity of a users password on a Linux/PAM
|
|||
```
|
||||
git clone https://git.xw3.org/hanez/checkpw.git
|
||||
cd checkpw
|
||||
gcc -lpam -lpam_misc -Werror -o checkpw checkpw.c
|
||||
sudo cp ./checkpw /usr/bin/
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
# Usage:
|
||||
|
|
|
|||
|
|
@ -256,10 +256,10 @@ int main(int argc, char *argv[]) {
|
|||
// Authenticate the user
|
||||
if (authenticate(username, password, verbose) == 0) {
|
||||
printf("Authenticated successfully.\n");
|
||||
exit(0);
|
||||
return 0;
|
||||
} else {
|
||||
printf("Authentication failed.\n");
|
||||
exit(1);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue