s3-rpc_server: Only allow epm insert and delete on NCALRPC.
authorAndreas Schneider <asn@samba.org>
Fri, 25 Feb 2011 11:06:19 +0000 (12:06 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 8 Mar 2011 10:41:30 +0000 (11:41 +0100)
Signed-off-by: Günther Deschner <gd@samba.org>
source3/rpc_server/epmapper/srv_epmapper.c

index 1852b5bf9779d7cffbf191a79f55dbccc3b35a94..f0bd9c63f513fcb8f3b4134bc1c7488b97b43d95 100644 (file)
@@ -233,7 +233,8 @@ error_status_t _epm_Insert(struct pipes_struct *p,
        uint32_t i;
 
        /* If this is not a priviledged users, return */
-       if (!is_priviledged_pipe(p->session_info)) {
+       if (p->transport != NCALRPC ||
+           !is_priviledged_pipe(p->session_info)) {
                return EPMAPPER_STATUS_CANT_PERFORM_OP;
        }
 
@@ -349,7 +350,8 @@ error_status_t _epm_Delete(struct pipes_struct *p,
                  r->in.num_ents));
 
        /* If this is not a priviledged users, return */
-       if (!is_priviledged_pipe(p->session_info)) {
+       if (p->transport != NCALRPC ||
+           !is_priviledged_pipe(p->session_info)) {
                return EPMAPPER_STATUS_CANT_PERFORM_OP;
        }