Commit 024df2e6 authored by jan.koester's avatar jan.koester
Browse files

test

parent ea0d75aa
Loading
Loading
Loading
Loading
Loading
+2 −3
Changes for src/authdb.h: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ namespace authdb {

        struct Record {
            int       start = 0xFE;
            uuid_t  ruid;
            uuid_t  ruid = {0};
            int       type = EmptyData;
            int       storage = EmptyStorage;
            char    fieldname[255] = {0};
@@ -95,8 +95,7 @@ namespace authdb {

        AuthData *curec=dat;

        uuid gid;
        gid=dat->Data.ruid;
        uuid gid(dat->Data.ruid);

        if(!target){
            while(curec){
+1 −1
Changes for src/domain.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ void authdb::Domain::info(AuthBackend& backend, class DomainData& dat, size_t& p
        backend.setPos(pos);
        backend.read((unsigned char*)cur,sizeof(AuthData::Record));
        pos=backend.getPos()+cur->datasize;
        if(cur->type == DataType::DomainData && dat.Data.ruid==cur->ruid &&
        if(cur->type == DataType::DomainData && uuid(dat.Data.ruid) ==cur->ruid &&
            strcmp(cur->fieldname,"domainname")==0
        ){

+3 −3
Changes for src/session.cpp: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -261,14 +261,14 @@ const authdb::SessionData *authdb::Session::addSession(AuthBackend &backend,uuid
                gpores=gpores->next;
            }
            gpores->GPOId=cur->ruid;
            gpores->GPORes=true; //gpodat->getGpoValue();
            gpores->GPORes=gpodat->getGpoValue();

            gpodat->getAlowed(allow);

            for(const uuid &al : allow){
                for(uuid member : _lastData->_members){
                    if(member==al){
                        // gpores->GPORes=gpodat->getGpoValue() ? false : true;
                        gpores->GPORes=gpodat->getGpoValue() ? false : true;
                    }
                }
            }
@@ -343,7 +343,7 @@ void authdb::Session::relSession(AuthBackend &backend,uuid sessionid){
        rd=backend.getPos()+cur->datasize;

        if(cur->type == UserData && strcmp(cur->fieldname,"username")==0
            && cur->ruid==cursess->_uid.value){
            && uuid(cur->ruid)==cursess->_uid.value){

            const std::shared_ptr<unsigned char[]>tmp(new unsigned char[cur->datasize]);
            backend.read(tmp.get(),cur->datasize);
+2 −2
Changes for src/user.cpp: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
#include "types.h"
#include "user.h"

authdb::UserData::UserData(uuid id) : AuthData(id){
authdb::UserData::UserData(const uuid &id) : AuthData(id){
    username=nullptr;
    firstname=nullptr;
    lastname=nullptr;
@@ -169,7 +169,7 @@ void authdb::User::info(AuthBackend &backend, class UserData& dat, size_t &pos){
        backend.setPos(pos);
        backend.read(reinterpret_cast<unsigned char*>(cur.get()),sizeof(AuthData::Record));
        pos=backend.getPos()+cur->datasize;
        if(cur->type == UserData && dat.Data.ruid==cur->ruid
        if(cur->type == UserData && uuid(dat.Data.ruid)==cur->ruid
            && strcmp(cur->fieldname,"username")==0
        ){

+1 −1
Changes for src/user.h: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@
namespace authdb {
    class UserData : public AuthData{
    public:
        UserData(uuid id);
        UserData(const uuid &id);

        ~UserData();

Loading