Commit 4bad213e authored by jan.koester's avatar jan.koester
Browse files

fixes

parent 8c8b4c45
Loading
Loading
Loading
Loading
Loading
+8 −4
Changes for src/session.cpp: 8 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -221,6 +221,8 @@ const authdb::SessionData *authdb::Session::addSession(AuthBackend &backend,uuid

    _lastData->_username=username;

    SessionData::GPOResult *gpores=&_lastData->_GPOResult;

    rd=sizeof(authdb::AuthHeader);
    while(rd<end){
        authdb::AuthData::Record cur;
@@ -235,16 +237,18 @@ const authdb::SessionData *authdb::Session::addSession(AuthBackend &backend,uuid
            class GpoData gpodat(cur.uuid);
            size_t upos=sizeof(authdb::AuthHeader);
            gpo.info(backend,gpodat,upos);
            if(_lastData->_GPOResult.GPOId.empty()){
                _lastData->_GPOResult.GPOId=cur.uuid;
                _lastData->_GPOResult.GPORes=gpodat.getGpoValue();
            if(!gpores->GPOId.empty()){
                gpores->next=new SessionData::GPOResult();
                gpores=gpores->next;
            }
            gpores->GPOId=cur.uuid;
            gpores->GPORes=gpodat.getGpoValue();
            for(const auto &member : mbs){
                GpoData::Allow allow;
                gpodat.getAlowed(allow);
                for(size_t i =0; i< allow.count; ++i){
                    if(member.value==allow.uid[i]){
                        _lastData->_GPOResult.GPORes=_lastData->_GPOResult.GPORes ? false : true;
                        gpores->GPORes=gpores->GPORes ? false : true;
                    }
                }
            }