Commit d8040697 authored by jan.koester's avatar jan.koester
Browse files

test

parent 040abc37
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@ authdb::AuthBackend::Guard::~Guard(){
}

int authdb::AuthBackend::searchValue(const char *fieldname, const char *value){
    Guard guard(*this, Shared);
    authdb::AuthData::Record *user=new AuthData::Record;
    size_t rd=sizeof(authdb::AuthHeader),brd=rd;
    while(rd<end()){
+0 −5
Original line number Diff line number Diff line
@@ -131,12 +131,7 @@ namespace authdb{
        void write(const unsigned char *dest,size_t destsize);
        void read(char unsigned *src,size_t srcsize);

        friend class User;
        friend class Client;
        friend class Gpo;
        friend class Group;
        friend class Domain;
        friend class ServiceManager;
        friend class RecordIndex;
        friend class DomainBackend;
        friend class Export;
+0 −3
Original line number Diff line number Diff line
@@ -137,8 +137,6 @@ bool authdb::Client::exits(AuthBackend& backend,const uuid::uuid &clid, const ch
}

void authdb::Client::info(AuthBackend& backend, class ClientData& dat, size_t& pos){
    AuthBackend::Guard guard(backend, AuthBackend::Shared);

    if(uuid::uuid(dat.Data.ruid).empty())
        throw AuthBackendError("client info uid required!");

@@ -159,7 +157,6 @@ authdb::ClientConnections *authdb::ClientConnections::next(){
}

void authdb::Client::remove(AuthBackend& backend, const uuid::uuid &clid){
    AuthBackend::Guard guard(backend);
    backend.delRecord(clid.value,DataType::ClientData);
}

+4 −0
Original line number Diff line number Diff line
@@ -92,6 +92,7 @@ namespace authdb {
    }

    bool AuthBackend::getRecord(AuthData &rec,int type){
        Guard guard(*this, Shared);
        bool found=false;
        size_t rd=sizeof(authdb::AuthHeader),bkend=end();

@@ -116,6 +117,7 @@ namespace authdb {
    }

    void AuthBackend::createRecord(AuthData &rec,int type){
        Guard guard(*this, Exclusive);
        size_t wd=end();

        for(AuthData* curec=&rec; curec; curec=curec->next()){
@@ -130,6 +132,7 @@ namespace authdb {
    }

    bool AuthBackend::editRecord(AuthData &rec,int type){
        Guard guard(*this, Exclusive);
        AuthData old(rec.Data.ruid);

        std::vector<AuthData::Record*> changemap; //use fieldname;
@@ -216,6 +219,7 @@ namespace authdb {
    }

    void AuthBackend::delRecord(const uuid::uuid &uid,int type){
        Guard guard(*this, Exclusive);
        if(uid.empty())
            throw AuthBackendError("user info uid required!");

+0 −2
Original line number Diff line number Diff line
@@ -144,8 +144,6 @@ bool authdb::Domain::exits(AuthBackend& backend,const uuid::uuid& did, const std
}

void authdb::Domain::info(AuthBackend& backend, class DomainData& dat, size_t& pos){
    AuthBackend::Guard guard(backend, AuthBackend::Shared);

    if(uuid::uuid(dat.Data.ruid).empty())
        throw AuthBackendError("Domain info domainid required!");

Loading