Fixed sopen problem
This commit is contained in:
parent
ba6ad86935
commit
d794f70ae8
@ -129,7 +129,7 @@ void XbbsArea::raw_open() {
|
|||||||
data->fhtext = test_open(AddPath(path(), ".Text"));
|
data->fhtext = test_open(AddPath(path(), ".Text"));
|
||||||
wide->isopen++;
|
wide->isopen++;
|
||||||
if(wide->isopen == 1)
|
if(wide->isopen == 1)
|
||||||
wide->user->fh = ::sopen(AddPath(wide->path, "Users"), O_RDONLY|O_BINARY, WideSharemode);
|
wide->user->fh = ::sopen(AddPath(wide->path, "Users"), O_RDONLY|O_BINARY, WideSharemode, S_STDRW);
|
||||||
|
|
||||||
GFTRK(NULL);
|
GFTRK(NULL);
|
||||||
}
|
}
|
||||||
@ -166,7 +166,7 @@ void XbbsInit(const char* path, int userno) {
|
|||||||
|
|
||||||
const char* _username = WideUsername[0];
|
const char* _username = WideUsername[0];
|
||||||
if(xbbswide->userno == -1) {
|
if(xbbswide->userno == -1) {
|
||||||
xbbswide->user->fh = ::sopen(AddPath(xbbswide->path, "Users"), O_RDONLY|O_BINARY, WideSharemode);
|
xbbswide->user->fh = ::sopen(AddPath(xbbswide->path, "Users"), O_RDONLY|O_BINARY, WideSharemode, S_STDRD);
|
||||||
if(xbbswide->user->fh != -1) {
|
if(xbbswide->user->fh != -1) {
|
||||||
xbbswide->user->find(_username);
|
xbbswide->user->find(_username);
|
||||||
if(not xbbswide->user->found) {
|
if(not xbbswide->user->found) {
|
||||||
|
@ -90,7 +90,7 @@ void XbbsArea::raw_scan(int __keep_index, int __scanpm) {
|
|||||||
|
|
||||||
// Load the lastread
|
// Load the lastread
|
||||||
ulong _lastread = 0;
|
ulong _lastread = 0;
|
||||||
int _fh = ::sopen(AddPath(path(), ".lmr"), O_RDONLY|O_BINARY, WideSharemode);
|
int _fh = ::sopen(AddPath(path(), ".lmr"), O_RDONLY|O_BINARY, WideSharemode, S_STDRD);
|
||||||
if(_fh != -1) {
|
if(_fh != -1) {
|
||||||
lseekset(_fh, wide->userno+1, sizeof(ulong));
|
lseekset(_fh, wide->userno+1, sizeof(ulong));
|
||||||
read(_fh, &_lastread, sizeof(ulong));
|
read(_fh, &_lastread, sizeof(ulong));
|
||||||
@ -104,7 +104,7 @@ void XbbsArea::raw_scan(int __keep_index, int __scanpm) {
|
|||||||
data->idx_size = 0;
|
data->idx_size = 0;
|
||||||
|
|
||||||
// Open index file
|
// Open index file
|
||||||
data->fhindex = ::sopen(AddPath(path(), ".Index"), O_RDONLY|O_BINARY, WideSharemode);
|
data->fhindex = ::sopen(AddPath(path(), ".Index"), O_RDONLY|O_BINARY, WideSharemode, S_STDRD);
|
||||||
if(data->fhindex != -1) {
|
if(data->fhindex != -1) {
|
||||||
|
|
||||||
// Allocate index buffer and read from file
|
// Allocate index buffer and read from file
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
char* XbbsArea::user_lookup(char* __lookfor) {
|
char* XbbsArea::user_lookup(char* __lookfor) {
|
||||||
|
|
||||||
wide->user->fh = ::sopen(AddPath(wide->path, "Users"), O_RDWR|O_BINARY, WideSharemode, S_STDRW);
|
wide->user->fh = ::sopen(AddPath(wide->path, "Users"), O_RDWR|O_BINARY, WideSharemode, S_STDRD);
|
||||||
if(wide->user->fh) {
|
if(wide->user->fh) {
|
||||||
wide->user->findwild(__lookfor, __lookfor);
|
wide->user->findwild(__lookfor, __lookfor);
|
||||||
::close(wide->user->fh);
|
::close(wide->user->fh);
|
||||||
|
Reference in New Issue
Block a user