summaryrefslogtreecommitdiff
path: root/source4/ntvfs/ntvfs_base.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-02 09:16:53 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-02 09:16:53 +0000
commitc290906b3f238ba0246624525046b6cdda214d27 (patch)
tree3672523d264abe9ea31d8709c524395290c1da7e /source4/ntvfs/ntvfs_base.c
parentcea22e94fca1863e88895a9c51c3679085d3c108 (diff)
downloadsamba-c290906b3f238ba0246624525046b6cdda214d27.tar.gz
samba-c290906b3f238ba0246624525046b6cdda214d27.tar.bz2
samba-c290906b3f238ba0246624525046b6cdda214d27.zip
make sure we can expand the critical versions structure without
causing crashes in old modules. Thanks to metze for pointing this out! (This used to be commit 2ee5540629e7922cd76d87ed53b70bf37b83e100)
Diffstat (limited to 'source4/ntvfs/ntvfs_base.c')
-rw-r--r--source4/ntvfs/ntvfs_base.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c
index 11f39c5d59..ad1b3ae671 100644
--- a/source4/ntvfs/ntvfs_base.c
+++ b/source4/ntvfs/ntvfs_base.c
@@ -88,14 +88,17 @@ struct ntvfs_ops *ntvfs_backend_byname(const char *name, enum ntvfs_type type)
This can be used by backends to either detect compilation errors, or provide
multiple implementations for different smbd compilation options in one module
*/
-int ntvfs_interface_version(struct ntvfs_critical_sizes *sizes)
+const struct ntvfs_critical_sizes *ntvfs_interface_version(void)
{
- sizes->sizeof_ntvfs_ops = sizeof(struct ntvfs_ops);
- sizes->sizeof_SMB_OFF_T = sizeof(SMB_OFF_T);
- sizes->sizeof_tcon_context = sizeof(struct tcon_context);
- sizes->sizeof_request_context = sizeof(struct request_context);
-
- return NTVFS_INTERFACE_VERSION;
+ static const struct ntvfs_critical_sizes critical_sizes = {
+ NTVFS_INTERFACE_VERSION,
+ sizeof(struct ntvfs_ops),
+ sizeof(SMB_OFF_T),
+ sizeof(struct tcon_context),
+ sizeof(struct request_context),
+ };
+
+ return &critical_sizes;
}