The fields of struct server command never need to be modified so they
can be const.
* check if perms are sufficient to exec a command having perms cmd_perms.
* Returns 0 if perms are sufficient, -E_PERM otherwise.
*/
-static int check_perms(unsigned int perms, struct server_command *cmd_ptr)
+static int check_perms(unsigned int perms, const struct server_command *cmd_ptr)
{
PARA_DEBUG_LOG("checking permissions\n");
return (cmd_ptr->perms & perms) < cmd_ptr->perms ? -E_PERM : 0;
/** Argument vector. */
char **argv;
/** The command being executed. */
- struct server_command *cmd;
+ const struct server_command *cmd;
/** File descriptor and crypto keys. */
struct stream_cipher_context scc;
};