Esempio n. 1
0
static NTSTATUS ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_ctr *r)
{
    int level;
    level = ndr_pull_get_switch_value(ndr, r);
    if (ndr_flags & NDR_SCALARS) {
        switch (level) {
        case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: {
            NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
            break;
        }

        case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: {
            NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
            break;
        }

        case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: {
            NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
            break;
        }

        case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: {
            NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
            break;
        }

        default: {
            break;
        }

        }
    }
    if (ndr_flags & NDR_BUFFERS) {
        switch (level) {
        case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT:
            NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
            break;

        case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT:
            NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
            break;

        case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT:
            NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
            break;

        case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT:
            NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
            break;

        default:
            break;

        }
    }
    return NT_STATUS_OK;
}
Esempio n. 2
0
_PUBLIC_ enum ndr_err_code ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_ctr *r)
{
	int level;
	level = ndr_pull_get_switch_value(ndr, r);
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_union_align(ndr, 4));
		switch (level) {
			case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: {
				NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
			break; }

			case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: {
				NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
			break; }

			case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: {
				NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
			break; }

			case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: {
				NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
			break; }

			default: {
			break; }

		}
	}
	if (ndr_flags & NDR_BUFFERS) {
		switch (level) {
			case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT:
				NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
			break;

			case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT:
				NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
			break;

			case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT:
				NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
			break;

			case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT:
				NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
			break;

			default:
			break;

		}
	}
	return NDR_ERR_SUCCESS;
}