Loading src/admin.cpp +2 −2 Changes for src/admin.cpp: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -1289,7 +1289,7 @@ namespace authdb { form << "<tr><td><label for=\""<< cur.fieldname <<"\">" << cur.fieldname << "</label></td>"; if(cur.storage==TextStorage){ if(cur.storage==TextStorage && strcmp(cur.fieldname ,"groupname")==0){ cur.data = new char[cur.datasize]; backend->read((unsigned char*)cur.data,cur.datasize); try { Loading Loading @@ -1338,9 +1338,9 @@ namespace authdb { delete[] curu.data; } } form << "</select>"; } backend->setPos(rd); form << "</td>"; } } Loading src/gpo.cpp +5 −3 Changes for src/gpo.cpp: 5 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -63,12 +63,14 @@ void authdb::GpoData::setAllowed(Allow &allowed){ memset(data,0,uidsize+sizeof(size_t)); std::copy(&allowed.count,&allowed.count+sizeof(size_t),data); if(allowed.count>0){ for(size_t i=0; i<allowed.count; ++i){ std::copy( reinterpret_cast<char*>(allowed.uid), reinterpret_cast<char*>(allowed.uid)+uidsize, data+sizeof(size_t) reinterpret_cast<char*>(&allowed.uid[i]), reinterpret_cast<char*>(&allowed.uid[i])+sizeof(uuid_t), data+((sizeof(uuid_t)*i)+sizeof(size_t)) ); } } setAuthData<const char>(DataType::PolicyData,StorageType::BinaryStorage,this,&_Allowed,"gpoallowed",data,uidsize+sizeof(size_t)); delete[] data; Loading src/session.cpp +7 −2 Changes for src/session.cpp: 7 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #include <iostream> #include <mutex> #include "session.h" Loading Loading @@ -198,7 +199,6 @@ const authdb::SessionData *authdb::Session::addSession(AuthBackend &backend,uuid rd=backend.getPos()+cur.datasize; if(cur.type == GroupData && strcmp(cur.fieldname,"groupname")==0){ Group group; class GroupData grpi(cur.uuid); size_t upos=sizeof(authdb::AuthHeader); Loading @@ -225,6 +225,7 @@ const authdb::SessionData *authdb::Session::addSession(AuthBackend &backend,uuid SessionData::GPOResult *gpores=&_lastData->_GPOResult; rd=sizeof(authdb::AuthHeader); while(rd<end){ authdb::AuthData::Record cur; Loading @@ -244,9 +245,13 @@ const authdb::SessionData *authdb::Session::addSession(AuthBackend &backend,uuid } gpores->GPOId=cur.uuid; gpores->GPORes=gpodat.getGpoValue(); for(const auto &member : mbs){ for(const uuid &member : _lastData->_members){ GpoData::Allow allow; gpodat.getAlowed(allow); std::cout << gpodat.getName() << std::endl; std::cout << allow.count << std::endl; std::cout.write((char*)member.value,16) << std::endl; for(size_t i =0; i< allow.count; ++i){ if(member==allow.uid[i]){ gpores->GPORes=gpores->GPORes ? false : true; Loading src/session.h +2 −2 File changed.Contains only whitespace changes. Show changes Loading
src/admin.cpp +2 −2 Changes for src/admin.cpp: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -1289,7 +1289,7 @@ namespace authdb { form << "<tr><td><label for=\""<< cur.fieldname <<"\">" << cur.fieldname << "</label></td>"; if(cur.storage==TextStorage){ if(cur.storage==TextStorage && strcmp(cur.fieldname ,"groupname")==0){ cur.data = new char[cur.datasize]; backend->read((unsigned char*)cur.data,cur.datasize); try { Loading Loading @@ -1338,9 +1338,9 @@ namespace authdb { delete[] curu.data; } } form << "</select>"; } backend->setPos(rd); form << "</td>"; } } Loading
src/gpo.cpp +5 −3 Changes for src/gpo.cpp: 5 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -63,12 +63,14 @@ void authdb::GpoData::setAllowed(Allow &allowed){ memset(data,0,uidsize+sizeof(size_t)); std::copy(&allowed.count,&allowed.count+sizeof(size_t),data); if(allowed.count>0){ for(size_t i=0; i<allowed.count; ++i){ std::copy( reinterpret_cast<char*>(allowed.uid), reinterpret_cast<char*>(allowed.uid)+uidsize, data+sizeof(size_t) reinterpret_cast<char*>(&allowed.uid[i]), reinterpret_cast<char*>(&allowed.uid[i])+sizeof(uuid_t), data+((sizeof(uuid_t)*i)+sizeof(size_t)) ); } } setAuthData<const char>(DataType::PolicyData,StorageType::BinaryStorage,this,&_Allowed,"gpoallowed",data,uidsize+sizeof(size_t)); delete[] data; Loading
src/session.cpp +7 −2 Changes for src/session.cpp: 7 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #include <iostream> #include <mutex> #include "session.h" Loading Loading @@ -198,7 +199,6 @@ const authdb::SessionData *authdb::Session::addSession(AuthBackend &backend,uuid rd=backend.getPos()+cur.datasize; if(cur.type == GroupData && strcmp(cur.fieldname,"groupname")==0){ Group group; class GroupData grpi(cur.uuid); size_t upos=sizeof(authdb::AuthHeader); Loading @@ -225,6 +225,7 @@ const authdb::SessionData *authdb::Session::addSession(AuthBackend &backend,uuid SessionData::GPOResult *gpores=&_lastData->_GPOResult; rd=sizeof(authdb::AuthHeader); while(rd<end){ authdb::AuthData::Record cur; Loading @@ -244,9 +245,13 @@ const authdb::SessionData *authdb::Session::addSession(AuthBackend &backend,uuid } gpores->GPOId=cur.uuid; gpores->GPORes=gpodat.getGpoValue(); for(const auto &member : mbs){ for(const uuid &member : _lastData->_members){ GpoData::Allow allow; gpodat.getAlowed(allow); std::cout << gpodat.getName() << std::endl; std::cout << allow.count << std::endl; std::cout.write((char*)member.value,16) << std::endl; for(size_t i =0; i< allow.count; ++i){ if(member==allow.uid[i]){ gpores->GPORes=gpores->GPORes ? false : true; Loading