Question: Please help me with this! getscore code #include #include #include #include #include FILE *scorefile; int get_score(char *name, char *ssn, char *score); char* str_prefix(char *prefix, char
Please help me with this!
getscore code
#include
while (fgets(line, 128, scorefile)!=NULL){ if ((match_point=str_prefix(matching_pattern, line))){ if (*match_point++==':'){ while (*match_point!=':'){ *score++=*match_point++; } *score=0; return 0; } } } return -1; } char* str_prefix(char *prefix, char *str){ while (*prefix && *str){ if (*prefix != *str) return NULL; prefix++; str++; } return *prefix==0?str:NULL; }
After a user logs into a Unix-based system, their user id is maintained in the ruid field of the process control block. In addition, the mapping between user id and name is stored in a system file /etc/passwd. For the getscore program we discussed in class, propose a different method for authentication that does not need to pass any user name or password through command line
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
