r25598: Add missing become_root/unbecome_root around calls of add_aliases.
[samba.git] / source / libsmb / smb_seal.c
index 2e3e2f4ce3c8ee249dada475260527cf2c2dc3bd..33352b85ceb14b35c5ae3c61006acdc734a2b528 100644 (file)
@@ -5,7 +5,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
@@ -72,7 +71,7 @@ NTSTATUS common_ntlm_decrypt_buffer(NTLMSSP_STATE *ntlmssp_state, char *buf)
                return NT_STATUS_BUFFER_TOO_SMALL;
        }
 
-       inbuf = smb_xmemdup(buf, buf_len);
+       inbuf = (char *)smb_xmemdup(buf, buf_len);
 
        /* Adjust for the signature. */
        data_len = buf_len - 8 - NTLMSSP_SIG_SIZE;
@@ -95,7 +94,7 @@ NTSTATUS common_ntlm_decrypt_buffer(NTLMSSP_STATE *ntlmssp_state, char *buf)
        memcpy(buf + 8, inbuf + 8 + NTLMSSP_SIG_SIZE, data_len);
 
        /* Reset the length. */
-       smb_setlen(buf, data_len + 4, inbuf);
+       smb_setlen(inbuf, buf, data_len + 4);
 
        SAFE_FREE(inbuf);
        return NT_STATUS_OK;
@@ -204,7 +203,7 @@ static NTSTATUS common_gss_decrypt_buffer(struct smb_tran_enc_state_gss *gss_sta
        }
 
        memcpy(buf + 8, out_buf.value, out_buf.length);
-       smb_setlen(buf, out_buf.length + 4, out_buf.value);
+       smb_setlen((char *)out_buf.value, buf, out_buf.length + 4);
 
        gss_release_buffer(&minor, &out_buf);
        return NT_STATUS_OK;
@@ -269,7 +268,7 @@ static NTSTATUS common_gss_encrypt_buffer(struct smb_tran_enc_state_gss *gss_sta
         * bother :-*(. JRA.
         */
 
-       *ppbuf_out = SMB_MALLOC(out_buf.length + 8); /* We know this can't wrap. */
+       *ppbuf_out = (char *)SMB_MALLOC(out_buf.length + 8); /* We know this can't wrap. */
        if (!*ppbuf_out) {
                gss_release_buffer(&minor, &out_buf);
                return NT_STATUS_NO_MEMORY;