30 #line 31 "UserSchemaMgr.cc"
34 myIdentity(*myIdentityArg)
158 fprintf(
logfile,
"UserSchemaMgr bad schema builtin %li\n",
173 fprintf(
logfile,
"UserSchemaMgr bad topic %i\n",
205 new class MessageUserSchema(TOPIC_LOGINFAIL);
217 new class MessageUserSchema(TOPIC_LOGINFAIL);
228 new class MessageUserSchema(TOPIC_LOGINFAIL);
240 new class MessageUserSchema(TOPIC_LOGINFAIL);
246 byte passworddigest[64];
247 SHA512().CalculateDigest(passworddigest,
254 new class MessageUserSchema(TOPIC_LOGINFAIL);
273 new class MessageUserSchema(TOPIC_CHANGEPASSWORDFAIL);
284 new class MessageUserSchema(TOPIC_CHANGEPASSWORDFAIL);
293 new class MessageUserSchema(TOPIC_CHANGEPASSWORDOK);
304 new class MessageUserSchema(TOPIC_CREATEDOMAINFAIL);
316 new class MessageUserSchema(TOPIC_CREATEDOMAINFAIL);
331 new class MessageUserSchema(TOPIC_CREATEDOMAINOK);
342 new class MessageUserSchema(TOPIC_CREATEUSERFAIL);
353 new class MessageUserSchema(TOPIC_CREATEUSERFAIL);
367 new class MessageUserSchema(TOPIC_CREATEUSERFAIL);
381 new class MessageUserSchema(TOPIC_CREATEUSERFAIL);
400 new class MessageUserSchema(TOPIC_CREATEUSEROK);
410 new class MessageUserSchema(TOPIC_DELETEUSERFAIL);
420 new class MessageUserSchema(TOPIC_DELETEUSERFAIL);
434 new class MessageUserSchema(TOPIC_DELETEUSERFAIL);
445 new class MessageUserSchema(TOPIC_DELETEUSERFAIL);
459 new class MessageUserSchema(TOPIC_DELETEUSERFAIL);
472 new class MessageUserSchema(TOPIC_DELETEUSERFAIL);
481 new class MessageUserSchema(TOPIC_DELETEUSEROK);
491 new class MessageUserSchema(TOPIC_DELETEDOMAINFAIL);
508 new class MessageUserSchema(TOPIC_DELETEDOMAINFAIL);
523 new class MessageUserSchema(TOPIC_DELETEDOMAINOK);
536 new class MessageUserSchema(TOPIC_SCHEMAREPLY);
545 fprintf(
logfile,
"no such cmd %i %s %i\n", cmd, __FILE__, __LINE__);
555 class Schema *schemaPtr = NULL;
582 new class MessageUserSchema(TOPIC_SCHEMAREPLY);
588 msgref.userschemaStruct.tableid = tid;
590 msgref.userschemaStruct.domainid =
domainid;
602 fprintf(
logfile,
"no such cmd %i %s %i\n", cmd, __FILE__, __LINE__);
614 int64_t tid = boost::lexical_cast<int64_t>(
resultVector->at(0));
616 int64_t len = boost::lexical_cast<int64_t>(
resultVector->at(2));
620 new class MessageUserSchema(TOPIC_SCHEMAREPLY);
659 if (!schemaPtr->tables.count(tid))
667 class Table *tablePtr = schemaPtr->tables[tid];
669 if (tablePtr->columnaNameToFieldMap.count(name))
678 msgref.userschemaStruct.fieldid = tablePtr->addfield(type, len, name,
680 schemaPtr->fieldNameToId[tid][
name] = msgref.userschemaStruct.fieldid;
682 msgref.userschemaStruct.tableid = tid;
683 msgref.userschemaStruct.fieldlen = len;
684 msgref.userschemaStruct.fieldtype = type;
685 msgref.userschemaStruct.indextype = idxtype;
687 msgref.userschemaStruct.domainid =
domainid;
688 msgref.argstring =
name;
689 msgref.userschemaStruct.argsize = 0;
699 fprintf(
logfile,
"no such cmd %i %s %i\n", cmd, __FILE__, __LINE__);
712 new class MessageUserSchema(TOPIC_SCHEMAREPLY);
721 fprintf(
logfile,
"no such cmd %i %s %i\n", cmd, __FILE__, __LINE__);
734 new class MessageUserSchema(TOPIC_SCHEMAREPLY);
743 fprintf(
logfile,
"no such cmd %i %s %i\n", cmd, __FILE__, __LINE__);
756 new class MessageUserSchema(TOPIC_SCHEMAREPLY);
765 fprintf(
logfile,
"no such cmd %i %s %i\n", cmd, __FILE__, __LINE__);
791 new class MessageUserSchema(TOPIC_OPERATION);
797 replyMsgRef.userschemaStruct.status =
801 &replyMsgRef.userschemaStruct.userid,
802 &replyMsgRef.userschemaStruct.domainid);
807 printf(
"%s %i anomaly operationtype %i\n", __FILE__, __LINE__,
811 replyMsgRef.userschemaStruct.operationid =
814 replyMsgRef.userschemaStruct.callerstate =
824 boost::unordered_map<std::string, int64_t>::iterator itDname2Did;
825 boost::unordered_map<int64_t, userNameToUserIdMap *>::iterator itDid2Unames;
826 boost::unordered_map<string, int64_t>::iterator itUname2Uid;
827 boost::unordered_map<int64_t, passwordStruct>::iterator itUid2Password;
836 *did = itDname2Did->second;
847 itUname2Uid = uname2Uid.find(username);
849 if (itUname2Uid == uname2Uid.end())
854 *uid = itUname2Uid->second;
857 itUid2Password = uid2Password.find(*uid);
859 if (itUid2Password == uid2Password.end())
866 byte passworddigest[64];
867 SHA512().CalculateDigest(passworddigest, (
const byte *)password.c_str(),