Commit 1c7229bf authored by jan.koester's avatar jan.koester
Browse files

fixed

parent 42c91c91
Loading
Loading
Loading
Loading
Loading
+1 −3
Changes for src/admin.cpp: 1 added line, 3 removed lines.
Original line number Diff line number Diff line
@@ -1664,7 +1664,7 @@ namespace authdb {
        }

        void editGpo(libhttppp::HttpRequest *curreq, const int tid, ULONG_PTR args){
            char cdid[255],cgpid[255];
            char cdid[128],cgpid[128];
            uuid_t did,gpid;

            uuid_clear(did);
@@ -1706,8 +1706,6 @@ namespace authdb {

            GpoData::Allow allow;

            gpodat.getAlowed(allow);

            if(GPOForm.getBoundary()){

                gpo.remove(*backend,gpid);
+2 −2
Changes for src/api.cpp: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ namespace authdb {

                        for(size_t ii =0; ii<allow.count; ++ii ){
                            if( _SessionData->isMemberOf(allow.uid[ii]) ){
                                    alowed=!alowed;
                                    alowed = alowed ? false : true;
                            }
                        }

@@ -253,7 +253,7 @@ namespace authdb {
                            _Backend.setPos(rd);
                            _Backend.read((unsigned char*)&cur,sizeof(AuthData::Record));
                            rd=_Backend.getPos()+cur.datasize;
                                                            std::cout << cur.fieldname << std::endl;

                            if(cur.type == ClientData && strcmp(cur.fieldname,"clientname")==0){
                                class ClientData cdat(cur.uuid);
                                size_t upos = sizeof(AuthHeader);
+1 −0
Changes for src/authdb.cpp: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -553,6 +553,7 @@ VALUEFOUND:
            if(uuid_compare(uid,cur->uuid) == 0 && type == cur->type){
                size_t dsize=cur->datasize;
                cur->start = 0xFE;
                cur->data=new char[dsize];
                memset(cur->data,0,dsize);
                memset(&cur->fieldname,0,255);
                memset(cur->uuid,0,sizeof(uuid_t));
+0 −1
Changes for src/gpo.cpp: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -83,7 +83,6 @@ void authdb::GpoData::getAlowed(Allow &allowed){
    }

    std::copy(_Allowed->data,_Allowed->data+sizeof(size_t),&allowed.count);
    std::cout << allowed.count << std::endl;
    allowed.uid=new uuid_t[allowed.count];
    const char *start = _Allowed->data+sizeof(size_t);
    for(size_t i =0; i<allowed.count; ++i){
+9 −6
Changes for src/group.cpp: 9 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -115,14 +115,17 @@ void authdb::GroupData::addMember(const MemberUids &uid){
    delete[] data;
}

bool authdb::GroupData::isMember(const uuid_t uid){
    if(!_Members)
bool authdb::GroupData::isMember(const uuid uid){
    if(!_Members){
        if(!getAuthData<char>(DataType::GroupData,StorageType::BinaryStorage,
                             this,&_Members,"groupmembers"))
                return false;
    }
    size_t count =  *_Members->data;
    char *mem=_Members->data+sizeof(size_t);

    MemberUids *mem=(MemberUids*)_Members->data;

    for(size_t i=0; i<mem->count; ++i){
        if(uuid_compare(uid,mem->uid[i])==0)
    for(size_t i=0; i< count; ++i){
        if(uid == *reinterpret_cast<uuid_t*>(mem+(i*sizeof(uuid_t))) )
            return true;
    }

Loading