Loading src/authdb.h +1 −1 Changes for src/authdb.h: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ namespace authdb { } target->start=0xFE; gid=target->ruid; std::copy(&gid.value[0],&gid.value[sizeof(uuid_t)],&target->ruid[0]); target->type=type; target->storage=storage; memset(target->fieldname,0,255); Loading src/gpo.cpp +8 −16 Changes for src/gpo.cpp: 8 added lines, 16 removed lines. Original line number Diff line number Diff line Loading @@ -61,12 +61,12 @@ bool authdb::GpoData::getGpoValue(){ void authdb::GpoData::setAllowed(const std::vector<uuid> &allowed){ size_t csize=allowed.size(); char *data=new char[(csize*sizeof(uuid_t))+sizeof(size_t)]; memset(data,0,(csize*sizeof(uuid_t))+sizeof(size_t)); csize*=sizeof(uuid_t); std::copy(&csize,&csize+sizeof(size_t),data); char *data=new char[csize]; memset(data,0,csize); csize=sizeof(size_t); csize=0; for(const uuid &al : allowed){ std::copy( Loading @@ -92,19 +92,11 @@ void authdb::GpoData::getAlowed(std::vector<uuid> &allowed){ } size_t asize=0; std::copy(_Allowed->data,_Allowed->data+sizeof(size_t),&asize); if(asize==0) return; asize*=sizeof(uuid_t); char *start=_Allowed->data+sizeof(size_t); for(size_t i =0; i<asize; i+=sizeof(uuid_t) ){ uuid tmp; std::copy(start+i,start+i+sizeof(uuid_t),&tmp.value[0]); allowed.push_back(tmp); for(size_t i =0; i<_Allowed->datasize; i+=sizeof(uuid_t) ){ uuid_t tmp; std::copy(_Allowed->data+i,_Allowed->data+i+sizeof(uuid_t),&tmp[0]); allowed.emplace_back(tmp); } } Loading Loading
src/authdb.h +1 −1 Changes for src/authdb.h: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ namespace authdb { } target->start=0xFE; gid=target->ruid; std::copy(&gid.value[0],&gid.value[sizeof(uuid_t)],&target->ruid[0]); target->type=type; target->storage=storage; memset(target->fieldname,0,255); Loading
src/gpo.cpp +8 −16 Changes for src/gpo.cpp: 8 added lines, 16 removed lines. Original line number Diff line number Diff line Loading @@ -61,12 +61,12 @@ bool authdb::GpoData::getGpoValue(){ void authdb::GpoData::setAllowed(const std::vector<uuid> &allowed){ size_t csize=allowed.size(); char *data=new char[(csize*sizeof(uuid_t))+sizeof(size_t)]; memset(data,0,(csize*sizeof(uuid_t))+sizeof(size_t)); csize*=sizeof(uuid_t); std::copy(&csize,&csize+sizeof(size_t),data); char *data=new char[csize]; memset(data,0,csize); csize=sizeof(size_t); csize=0; for(const uuid &al : allowed){ std::copy( Loading @@ -92,19 +92,11 @@ void authdb::GpoData::getAlowed(std::vector<uuid> &allowed){ } size_t asize=0; std::copy(_Allowed->data,_Allowed->data+sizeof(size_t),&asize); if(asize==0) return; asize*=sizeof(uuid_t); char *start=_Allowed->data+sizeof(size_t); for(size_t i =0; i<asize; i+=sizeof(uuid_t) ){ uuid tmp; std::copy(start+i,start+i+sizeof(uuid_t),&tmp.value[0]); allowed.push_back(tmp); for(size_t i =0; i<_Allowed->datasize; i+=sizeof(uuid_t) ){ uuid_t tmp; std::copy(_Allowed->data+i,_Allowed->data+i+sizeof(uuid_t),&tmp[0]); allowed.emplace_back(tmp); } } Loading