Use GNU getopt in dbck.
(longopts): New variable. (main): Rewrote the option-parsing loop to use GNU getopt. Help in dbck. (give_help): New function. (main): Call it if -h (or --help) is given. Reset passwords in dbck. (reset_pwd): New variable. (main): Set it if -P (or --clear-password) is given. (check_persons): Reset the password if the person number equals reset_pwd. Grant permission in dbck. (grant_all): New variable. (main): Set it if -G (or --grant-all) is given. (check_persons): Give the person all privileges if the person number equals grant_all.
Showing with 145 additions and 33 deletions