3.1.4.5 RRPC_FWSetGlobalConfig (Opnum 4)

The RRPC_FWSetGlobalConfig method modifies the value of a global policy configuration option. The client specifies to the server in what store this value MUST be written and what specific configuration option it is interested in modifying.

 unsigned long RRPC_FWSetGlobalConfig(
   [in] FW_CONN_HANDLE rpcConnHandle,
   [in] unsigned short BinaryVersion,
   [in] FW_STORE_TYPE StoreType,
   [in, range(FW_GLOBAL_CONFIG_INVALID+1, FW_GLOBAL_CONFIG_MAX-1)] 
     FW_GLOBAL_CONFIG configID,
   [in, unique, size_is(dwBufSize)] 
     unsigned char* lpBuffer,
   [in, range(0, 10*1024)] unsigned long dwBufSize
 );

rpcConnHandle: This parameter is an RPC binding handle that connects to the RPC interface of the Firewall and Advanced Security Protocol.

BinaryVersion: This parameter specifies the RPC interface binary version. This implies versions of the methods and versions of the structures.

StoreType: This parameter specifies the policy store in which the client wants to modify this configuration option.

configID: This parameter specifies the specific global policy configuration option the client wants to modify.

lpBuffer: This is an input parameter. This parameter is a pointer to the buffer that the client provides containing the value to write on the configuration option specified. If the buffer is NULL, this method deletes the configuration option.

dwBufSize: This parameter is the size of the buffer to which the lpBuffer parameter points.

Return Values: The method returns 0 if successful; if failed, it returns a nonzero error code. The field can take any specific error code value, as specified in [MS-ERREF]. The following return values are common.

Return value/code

Description

0x00000005

ERROR_ACCESS_DENIED

The client does not have the required credentials to call the method.

0x00000032

ERROR_NOT_SUPPORTED

The store type specified does not support this method.

0x00000057

ERROR_INVALID_PARAMETER

One of the parameters of this method is incorrect, or is required and not specified. This error can be returned because:

  • The specific configuration option is not meant to be available in the specified store.

  • The specified configuration option is not defined.

  • One of the required values is not specified.

  • The buffer is null but dwBufSize says otherwise.

  • The buffer size is not enough to hold the specific value.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol, as specified in [MS-RPCE]. If any lower-layer errors are reported by RPC exception, this exception is converted to an error code and reported to higher-layer protocols via the return value.

This method performs a merge operation of the resultant configuration values, as defined in section 3.1.3. It then determines what modifications are necessary on the rule objects to make sure the policy is enforced.

The server MUST validate that the client is authorized to perform the requested operation (as defined in section 3.1.4) before executing this method.