Revision 4c8b82e2 src/rm/RequestManagerVirtualMachine.cc

View differences:

src/rm/RequestManagerVirtualMachine.cc
69 69
    {
70 70
        string t_xml;
71 71

  
72
        ar.add_create_auth(att.uid, att.gid, PoolObjectSQL::IMAGE, tmpl->to_xml(t_xml));
72
        ar.add_create_auth(att.uid, att.gid, PoolObjectSQL::IMAGE, 
73
                tmpl->to_xml(t_xml));
73 74
    }
74 75

  
75 76
    if ( vtmpl != 0 )
......
1835 1836
    {
1836 1837
        string aname;
1837 1838

  
1838
        if (tmpl.check(aname))
1839
        if (tmpl.check_restricted(aname))
1839 1840
        {
1840 1841
            att.resp_msg = "Template includes a restricted attribute " + aname;
1841 1842
            failure_response(AUTHORIZATION, att);
......
1910 1911
        case VirtualMachine::DONE:
1911 1912
        case VirtualMachine::SUSPENDED:
1912 1913
        case VirtualMachine::ACTIVE:
1913
            att.resp_msg="Resize action is not available for state "+vm->state_str();
1914
            att.resp_msg="Resize action is not available for state " +
1915
                vm->state_str();
1916

  
1914 1917
            failure_response(ACTION, att);
1915 1918

  
1916 1919
            vm->unlock();
......
2042 2045
        case VirtualMachine::DONE:
2043 2046
        case VirtualMachine::SUSPENDED:
2044 2047
        case VirtualMachine::ACTIVE:
2045
            att.resp_msg = "Resize action is not available for state " + vm->state_str();
2048
            att.resp_msg = "Resize action is not available for state " + 
2049
                vm->state_str();
2050

  
2046 2051
            failure_response(ACTION, att);
2047 2052

  
2048 2053
            vm->unlock();
......
2298 2303
    {
2299 2304
        string aname;
2300 2305

  
2301
        if (tmpl.check(aname))
2306
        if (tmpl.check_restricted(aname))
2302 2307
        {
2303 2308
            att.resp_msg = "NIC includes a restricted attribute " + aname;
2304 2309
            return AUTHORIZATION;
2305 2310
        }
2306 2311
    }
2307 2312

  
2308
    if (quota_authorization(&tmpl, Quotas::NETWORK, att_quota, att.resp_msg) == false)
2313
    if (quota_authorization(&tmpl, Quotas::NETWORK, att_quota,
2314
                att.resp_msg) == false)
2309 2315
    {
2310 2316
        return AUTHORIZATION;
2311 2317
    }
......
2892 2898
    {
2893 2899
        string aname;
2894 2900

  
2895
        if (tmpl.check(aname))
2901
        if (tmpl.check_restricted(aname))
2896 2902
        {
2897 2903
            att.resp_msg = "Template includes a restricted attribute " + aname;
2898 2904
            failure_response(AUTHORIZATION, att);

Also available in: Unified diff