Skip to content
Snippets Groups Projects
Commit 1d110ca2 authored by rswindell's avatar rswindell
Browse files

putuserdat() and putuserrec() now opens user.dat iin rd/wr mode to allow

bcc/linux sopen/lock to succeed.
parent c9f7910c
Branches
Tags
No related merge requests found
......@@ -433,7 +433,7 @@ int DLLCALL putuserdat(scfg_t* cfg, user_t* user)
putrec(userdat,U_UNUSED+29,2,crlf);
sprintf(str,"%suser/user.dat", cfg->data_dir);
if((file=nopen(str,O_WRONLY|O_CREAT|O_DENYNONE))==-1) {
if((file=nopen(str,O_RDWR|O_CREAT|O_DENYNONE))==-1) {
return(errno);
}
......@@ -1211,7 +1211,7 @@ int DLLCALL putuserrec(scfg_t* cfg, int usernumber,int start, uint length, char
return(-1);
sprintf(str2,"%suser/user.dat",cfg->data_dir);
if((file=nopen(str2,O_WRONLY|O_DENYNONE))==-1)
if((file=nopen(str2,O_RDWR|O_DENYNONE))==-1)
return(errno);
if(filelength(file)<((long)usernumber-1)*U_LEN) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment