summaryrefslogtreecommitdiff
path: root/indra/llinventory/llpermissions.cpp
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2020-11-11 15:43:06 -0700
committerDave Houlton <euclid@lindenlab.com>2020-11-11 15:43:06 -0700
commit21e2f3e974cfe8e337a7dae7dc26e68fb3c2c4ba (patch)
treec174e7cc65e82e3efd7d119e5644162187369c04 /indra/llinventory/llpermissions.cpp
parentf9a09406b38ad62e1db5914a96e462002c80fce9 (diff)
parent04c473ab46041133ea6a87dbe0d43e662472adf5 (diff)
Merge branch 'master' 6.4.12 into DRTVWR-510
Diffstat (limited to 'indra/llinventory/llpermissions.cpp')
-rw-r--r--indra/llinventory/llpermissions.cpp142
1 files changed, 0 insertions, 142 deletions
diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp
index e79b753514..0359d2f554 100644
--- a/indra/llinventory/llpermissions.cpp
+++ b/indra/llinventory/llpermissions.cpp
@@ -565,148 +565,6 @@ void LLPermissions::unpackMessage(LLMessageSystem* msg, const char* block, S32 b
}
-//
-// File support
-//
-
-BOOL LLPermissions::importFile(LLFILE* fp)
-{
- init(LLUUID::null, LLUUID::null, LLUUID::null, LLUUID::null);
- const S32 BUFSIZE = 16384;
-
- // *NOTE: Changing the buffer size will require changing the scanf
- // calls below.
- char buffer[BUFSIZE]; /* Flawfinder: ignore */
- char keyword[256]; /* Flawfinder: ignore */
- char valuestr[256]; /* Flawfinder: ignore */
- char uuid_str[256]; /* Flawfinder: ignore */
- U32 mask;
-
- keyword[0] = '\0';
- valuestr[0] = '\0';
-
- while (!feof(fp))
- {
- if (fgets(buffer, BUFSIZE, fp) == NULL)
- {
- buffer[0] = '\0';
- }
-
- sscanf( /* Flawfinder: ignore */
- buffer,
- " %255s %255s",
- keyword, valuestr);
- if (!strcmp("{", keyword))
- {
- continue;
- }
- if (!strcmp("}",keyword))
- {
- break;
- }
- else if (!strcmp("creator_mask", keyword))
- {
- // legacy support for "creator" masks
- sscanf(valuestr, "%x", &mask);
- mMaskBase = mask;
- fixFairUse();
- }
- else if (!strcmp("base_mask", keyword))
- {
- sscanf(valuestr, "%x", &mask);
- mMaskBase = mask;
- //fixFairUse();
- }
- else if (!strcmp("owner_mask", keyword))
- {
- sscanf(valuestr, "%x", &mask);
- mMaskOwner = mask;
- }
- else if (!strcmp("group_mask", keyword))
- {
- sscanf(valuestr, "%x", &mask);
- mMaskGroup = mask;
- }
- else if (!strcmp("everyone_mask", keyword))
- {
- sscanf(valuestr, "%x", &mask);
- mMaskEveryone = mask;
- }
- else if (!strcmp("next_owner_mask", keyword))
- {
- sscanf(valuestr, "%x", &mask);
- mMaskNextOwner = mask;
- }
- else if (!strcmp("creator_id", keyword))
- {
- sscanf(valuestr, "%255s", uuid_str); /* Flawfinder: ignore */
- mCreator.set(uuid_str);
- }
- else if (!strcmp("owner_id", keyword))
- {
- sscanf(valuestr, "%255s", uuid_str); /* Flawfinder: ignore */
- mOwner.set(uuid_str);
- }
- else if (!strcmp("last_owner_id", keyword))
- {
- sscanf(valuestr, "%255s", uuid_str); /* Flawfinder: ignore */
- mLastOwner.set(uuid_str);
- }
- else if (!strcmp("group_id", keyword))
- {
- sscanf(valuestr, "%255s", uuid_str); /* Flawfinder: ignore */
- mGroup.set(uuid_str);
- }
- else if (!strcmp("group_owned", keyword))
- {
- sscanf(valuestr, "%d", &mask);
- if(mask) mIsGroupOwned = true;
- else mIsGroupOwned = false;
- }
- else
- {
- LL_INFOS() << "unknown keyword " << keyword << " in permissions import" << LL_ENDL;
- }
- }
- fix();
- return TRUE;
-}
-
-
-BOOL LLPermissions::exportFile(LLFILE* fp) const
-{
- std::string uuid_str;
-
- fprintf(fp, "\tpermissions 0\n");
- fprintf(fp, "\t{\n");
-
- fprintf(fp, "\t\tbase_mask\t%08x\n", mMaskBase);
- fprintf(fp, "\t\towner_mask\t%08x\n", mMaskOwner);
- fprintf(fp, "\t\tgroup_mask\t%08x\n", mMaskGroup);
- fprintf(fp, "\t\teveryone_mask\t%08x\n", mMaskEveryone);
- fprintf(fp, "\t\tnext_owner_mask\t%08x\n", mMaskNextOwner);
-
- mCreator.toString(uuid_str);
- fprintf(fp, "\t\tcreator_id\t%s\n", uuid_str.c_str());
-
- mOwner.toString(uuid_str);
- fprintf(fp, "\t\towner_id\t%s\n", uuid_str.c_str());
-
- mLastOwner.toString(uuid_str);
- fprintf(fp, "\t\tlast_owner_id\t%s\n", uuid_str.c_str());
-
- mGroup.toString(uuid_str);
- fprintf(fp, "\t\tgroup_id\t%s\n", uuid_str.c_str());
-
- if(mIsGroupOwned)
- {
- fprintf(fp, "\t\tgroup_owned\t1\n");
- }
- fprintf(fp,"\t}\n");
- return TRUE;
-}
-
-
BOOL LLPermissions::importLegacyStream(std::istream& input_stream)
{
init(LLUUID::null, LLUUID::null, LLUUID::null, LLUUID::null);