1. A method for protecting access to privileged functions in a computer system, comprising: (a) receiving a function call to a called function from a calling function; (b) detecting a macro embedded within the called function, wherein the macro identifies the called function as a privileged function; (c) determining whether the function call is received from a privileged function; (d) when the function call is received from a privileged function, determining whether the function call conforms with at least one of one or more valid call sequences of privileged functions; (e) permitting access to the called function when the function call is received from a privileged function and conforms with at least one of the one or more valid call sequences of the privileged functions; and (f) denying access to the called function when the function call is not received from a privileged function or does not conform with at least one of the one or more valid call sequences of the privileged functions.