smbstatus: always initialize a messaing context
[samba.git] / source3 / modules / vfs_smb_traffic_analyzer.c
index 06ff1f6956da98179ecc7a826d54bdc2305845bb..f5c39ad6d7ce096346cba9410f3241605f902999 100644 (file)
@@ -29,7 +29,7 @@
 #include "../librpc/gen_ndr/ndr_netlogon.h"
 #include "auth.h"
 #include "../lib/tsocket/tsocket.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw_data.h"
 
 /* abstraction for the send_over_network function */
 enum sock_type {INTERNET_SOCKET = 0, UNIX_DOMAIN_SOCKET};
@@ -175,7 +175,7 @@ static char *smb_traffic_analyzer_encrypt( TALLOC_CTX *ctx,
        unsigned char filler[17]= "................";
        char *output;
        if (akey == NULL) return NULL;
-       samba_AES_set_encrypt_key((const unsigned char *) akey, 128, &key);
+       AES_set_encrypt_key((const unsigned char *) akey, 128, &key);
        s1 = strlen(str) / 16;
        s2 = strlen(str) % 16;
        memcpy(filler, str + (s1*16), s2);
@@ -185,10 +185,10 @@ static char *smb_traffic_analyzer_encrypt( TALLOC_CTX *ctx,
        *len = ((s1 + 1)*16);
        output = talloc_array(ctx, char, *len);
        for (h = 0; h < s1; h++) {
-               samba_AES_encrypt((unsigned char *) str+(16*h), output+16*h,
+               AES_encrypt((const unsigned char *) str+(16*h), (unsigned char *)output+16*h,
                        &key);
        }
-       samba_AES_encrypt(filler, (const unsigned char *)(output+(16*h)), &key);
+       AES_encrypt(filler, (unsigned char *)(output+(16*h)), &key);
        *len = (s1*16)+16;
        return output;
 }
@@ -919,6 +919,7 @@ static struct vfs_fn_pointers vfs_smb_traffic_analyzer_fns = {
 };
 
 /* Module initialization */
+static_decl_vfs;
 NTSTATUS vfs_smb_traffic_analyzer_init(void)
 {
        NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,