Solutions for HT WWW under Cygwin

xiaoxiao2021-03-06  17

The following question is Dinger @ YTHT several solutions under Ytht WWW Cygwin.

1. Solve the error problem when the user login: User login error ERROR Error Emergency Solution: NJU09 / BBSLogin.c Static Char * Check_Multi (CHAR * ID, INT UID) {INT I, UENT, NSEARCH; IF (UID <= 0 | | uid> maxusers) Return Null; if (1 && strcasecmp (id, "guest")) {// This algorithm, wwwlogin must limit the number of login window, otherwise // List of list will be easily done for FOR (i = 3 i <6; i ) {uent = uindexshm-> user [uid - 1] [i] / * - 1 * /; 2 phenomenon: Using the web mode registration not written. PasswDS file analysis: adduser () [bbsdoreg. c] In the case of opening the .passwds file and locks, call save_user_rec () [bbslib.c] once again opens the file again, and trying to write to failure, addUser () is not after calling save_user_rec (). Then access the file so the solution is to turn off the file before calling save_user_rec () This change is currently unusually resolved: [bbsdoreg.c] int Adduser (struct useerec * x) {INT i; file * fp; fp = fopen ".Passwds", "R "); FLOCK (FILENO (FP), Lock_ex); IF (GetUser (X-> UserID)) {Flock (FiLeno (FP), Lock_un; fclose (fp); Return -1; } Flock (Fileno (FP), Lock_un; Fclose (fp); for (i = 0; i userid [i] [0] == 0) {if (i 1> shm_ucache-> number) shm_ucache-> Number = I 1; STRNCPY (shm_ucache-> userid [i], x-> userid, 13); INSERTUSERIDHASH (Uidhashshm-> UHI, UCACHE_HASH_SIZE, X-> UserID, I 1); Save_user_rec (x);

转载请注明原文地址:https://www.9cbs.com/read-58641.html

New Post(0)