mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-08 21:16:39 +09:00
feature #1681: Conversions from string to mask (binary) are made in User::get_umask
This commit is contained in:
1 parent
24e913fb2c
commit
c5044cd51b
2 files changed
+4
-21
No files matched your search
@@ -356,23 +356,6 @@ public:
|
||||
return nebula_configuration->to_xml(xml);
|
||||
};
|
||||
|
||||
int get_default_umask() const
|
||||
{
|
||||
string umask_st;
|
||||
int umask;
|
||||
|
||||
istringstream iss;
|
||||
|
||||
get_configuration_attribute(
|
||||
"DEFAULT_UMASK", umask_st);
|
||||
|
||||
iss.str(umask_st);
|
||||
|
||||
iss >> oct >> umask;
|
||||
|
||||
return umask;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Default Quotas
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
+4
-4
@@ -197,8 +197,8 @@ int User::from_xml(const string& xml)
|
||||
rc += obj_template->from_xml_node(content[0]);
|
||||
|
||||
ObjectXML::free_nodes(content);
|
||||
|
||||
rc += quota.from_xml(this);
|
||||
|
||||
rc += quota.from_xml(this);
|
||||
|
||||
if (rc != 0)
|
||||
{
|
||||
@@ -298,14 +298,14 @@ int User::get_umask() const
|
||||
|
||||
if(umask_st.empty())
|
||||
{
|
||||
return Nebula::instance().get_default_umask();
|
||||
Nebula::instance().get_configuration_attribute("DEFAULT_UMASK",umask_st);
|
||||
}
|
||||
|
||||
iss.str(umask_st);
|
||||
|
||||
iss >> oct >> umask;
|
||||
|
||||
return umask;
|
||||
return (umask & 0777);
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
Reference in new issue
Block a user