Loading src/authdb.h +2 −0 Changes for src/authdb.h: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ namespace authdb { AuthData *_next; private: friend int searchValue(authdb::AuthBackend &backend,const char*fieldname,const char *value); friend void createRecord(AuthBackend &backend,AuthData &rec,int type); friend bool getRecord(authdb::AuthBackend &backend,AuthData &rec,int type); friend bool editRecord(AuthBackend &backend,AuthData &rec,int type); friend void delRecord(authdb::AuthBackend &backend,const uuid_t uid,int type); Loading Loading @@ -155,6 +156,7 @@ namespace authdb { throw(authdb::AuthBackendError(err.c_str())); } void createRecord(authdb::AuthBackend &backend,AuthData &rec,int type); bool getRecord(authdb::AuthBackend &backend,AuthData &rec,int type); bool editRecord(AuthBackend &backend,AuthData &rec,int type); void delRecord(authdb::AuthBackend &backend,const uuid_t uid,int type); Loading src/client.cpp +1 −9 Changes for src/client.cpp: 1 added line, 9 removed lines. Original line number Diff line number Diff line Loading @@ -86,15 +86,7 @@ void authdb::Client::create(AuthBackend& backend, class ClientData* data){ } } size_t wd=backend.end(); for(AuthData *curec=data; curec; curec=curec->next()){ curec->Data.type=ClientData; backend.setPos(wd); backend.write(reinterpret_cast<unsigned char*>(&curec->Data),sizeof(struct AuthData::Record)); backend.write(reinterpret_cast<unsigned char*>(curec->Data.data),curec->Data.datasize); wd=backend.end(); } createRecord(backend,*data,DataType::ClientData); } bool authdb::Client::exits(AuthBackend& backend, uuid_t* clid, const char* name, int& ret){ Loading src/data.cpp +12 −0 Changes for src/data.cpp: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -109,6 +109,18 @@ namespace authdb { return found; } void createRecord(authdb::AuthBackend &backend,AuthData &rec,int type){ size_t wd=backend.end(); for(AuthData* curec=&rec; curec; curec=curec->next()){ curec->Data.type=type; backend.setPos(wd); backend.write(reinterpret_cast<unsigned char*>(&curec->Data),sizeof(struct AuthData::Record)); backend.write(reinterpret_cast<unsigned char*>(curec->Data.data),curec->Data.datasize); wd=backend.end(); } } bool editRecord(AuthBackend &backend,AuthData &rec,int type){ AuthData old(rec.Data.uuid); Loading src/domain.cpp +1 −9 Changes for src/domain.cpp: 1 added line, 9 removed lines. Original line number Diff line number Diff line Loading @@ -79,15 +79,7 @@ void authdb::Domain::create(authdb::AuthBackend& backend,class DomainData *data) } } size_t wd=backend.end(); for(AuthData *curec=data; curec; curec=curec->next()){ curec->Data.type=DataType::DomainData; backend.setPos(wd); backend.write((unsigned char*)&curec->Data,sizeof(struct AuthData::Record)); backend.write((unsigned char*)curec->Data.data,curec->Data.datasize); wd=backend.end(); } createRecord(backend,*data,DataType::DomainData); } void authdb::Domain::remove(AuthBackend& backend, const uuid_t uid){ Loading src/gpo.cpp +1 −6 Changes for src/gpo.cpp: 1 added line, 6 removed lines. Original line number Diff line number Diff line Loading @@ -174,12 +174,7 @@ void authdb::Gpo::create(AuthBackend& backend, class GpoData* dat){ } } backend.setPos(backend.end()); for(AuthData *curec=dat; curec; curec=curec->next()){ backend.write(reinterpret_cast<unsigned char*>(&curec->Data),sizeof(struct AuthData::Record)); backend.write(reinterpret_cast<unsigned char*>(curec->Data.data),curec->Data.datasize); } createRecord(backend,*dat,DataType::PolicyData); } void authdb::Gpo::remove(AuthBackend &backend,const uuid_t gpid){ Loading Loading
src/authdb.h +2 −0 Changes for src/authdb.h: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ namespace authdb { AuthData *_next; private: friend int searchValue(authdb::AuthBackend &backend,const char*fieldname,const char *value); friend void createRecord(AuthBackend &backend,AuthData &rec,int type); friend bool getRecord(authdb::AuthBackend &backend,AuthData &rec,int type); friend bool editRecord(AuthBackend &backend,AuthData &rec,int type); friend void delRecord(authdb::AuthBackend &backend,const uuid_t uid,int type); Loading Loading @@ -155,6 +156,7 @@ namespace authdb { throw(authdb::AuthBackendError(err.c_str())); } void createRecord(authdb::AuthBackend &backend,AuthData &rec,int type); bool getRecord(authdb::AuthBackend &backend,AuthData &rec,int type); bool editRecord(AuthBackend &backend,AuthData &rec,int type); void delRecord(authdb::AuthBackend &backend,const uuid_t uid,int type); Loading
src/client.cpp +1 −9 Changes for src/client.cpp: 1 added line, 9 removed lines. Original line number Diff line number Diff line Loading @@ -86,15 +86,7 @@ void authdb::Client::create(AuthBackend& backend, class ClientData* data){ } } size_t wd=backend.end(); for(AuthData *curec=data; curec; curec=curec->next()){ curec->Data.type=ClientData; backend.setPos(wd); backend.write(reinterpret_cast<unsigned char*>(&curec->Data),sizeof(struct AuthData::Record)); backend.write(reinterpret_cast<unsigned char*>(curec->Data.data),curec->Data.datasize); wd=backend.end(); } createRecord(backend,*data,DataType::ClientData); } bool authdb::Client::exits(AuthBackend& backend, uuid_t* clid, const char* name, int& ret){ Loading
src/data.cpp +12 −0 Changes for src/data.cpp: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -109,6 +109,18 @@ namespace authdb { return found; } void createRecord(authdb::AuthBackend &backend,AuthData &rec,int type){ size_t wd=backend.end(); for(AuthData* curec=&rec; curec; curec=curec->next()){ curec->Data.type=type; backend.setPos(wd); backend.write(reinterpret_cast<unsigned char*>(&curec->Data),sizeof(struct AuthData::Record)); backend.write(reinterpret_cast<unsigned char*>(curec->Data.data),curec->Data.datasize); wd=backend.end(); } } bool editRecord(AuthBackend &backend,AuthData &rec,int type){ AuthData old(rec.Data.uuid); Loading
src/domain.cpp +1 −9 Changes for src/domain.cpp: 1 added line, 9 removed lines. Original line number Diff line number Diff line Loading @@ -79,15 +79,7 @@ void authdb::Domain::create(authdb::AuthBackend& backend,class DomainData *data) } } size_t wd=backend.end(); for(AuthData *curec=data; curec; curec=curec->next()){ curec->Data.type=DataType::DomainData; backend.setPos(wd); backend.write((unsigned char*)&curec->Data,sizeof(struct AuthData::Record)); backend.write((unsigned char*)curec->Data.data,curec->Data.datasize); wd=backend.end(); } createRecord(backend,*data,DataType::DomainData); } void authdb::Domain::remove(AuthBackend& backend, const uuid_t uid){ Loading
src/gpo.cpp +1 −6 Changes for src/gpo.cpp: 1 added line, 6 removed lines. Original line number Diff line number Diff line Loading @@ -174,12 +174,7 @@ void authdb::Gpo::create(AuthBackend& backend, class GpoData* dat){ } } backend.setPos(backend.end()); for(AuthData *curec=dat; curec; curec=curec->next()){ backend.write(reinterpret_cast<unsigned char*>(&curec->Data),sizeof(struct AuthData::Record)); backend.write(reinterpret_cast<unsigned char*>(curec->Data.data),curec->Data.datasize); } createRecord(backend,*dat,DataType::PolicyData); } void authdb::Gpo::remove(AuthBackend &backend,const uuid_t gpid){ Loading