summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-02-03 11:10:56 +0000
committerStefan Metzmacher <metze@samba.org>2004-02-03 11:10:56 +0000
commit1c798aba40fb0e389c7a54ad3d8f7d45876f2809 (patch)
tree3ee4790e25089106db52b1f16d20583f7bf90b9e /source4/ntvfs
parenta9b28120b84fd63e333d5be26fe8116c85f12c87 (diff)
downloadsamba-1c798aba40fb0e389c7a54ad3d8f7d45876f2809.tar.gz
samba-1c798aba40fb0e389c7a54ad3d8f7d45876f2809.tar.bz2
samba-1c798aba40fb0e389c7a54ad3d8f7d45876f2809.zip
- port AUTH and PASSDB subsystems to new
SMB_SUBSYSTEM() scheme - some const fixes in ntvfs metze (This used to be commit af89a78123068767b1d134969c5651a0fd978b0d)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/ntvfs_base.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c
index 3e1f77edce..7ed8c738b6 100644
--- a/source4/ntvfs/ntvfs_base.c
+++ b/source4/ntvfs/ntvfs_base.c
@@ -30,7 +30,7 @@
* can be more than one backend with the same name, as long as they
* have different typesx */
static struct {
- struct ntvfs_ops *ops;
+ const struct ntvfs_ops *ops;
} *backends = NULL;
static int num_backends;
@@ -44,7 +44,8 @@ static int num_backends;
*/
static NTSTATUS ntvfs_register(void *_ops)
{
- struct ntvfs_ops *ops = _ops;
+ const struct ntvfs_ops *ops = _ops;
+ struct ntvfs_ops *new_ops;
if (ntvfs_backend_byname(ops->name, ops->type) != NULL) {
/* its already registered! */
@@ -58,8 +59,10 @@ static NTSTATUS ntvfs_register(void *_ops)
smb_panic("out of memory in ntvfs_register");
}
- backends[num_backends].ops = smb_xmemdup(ops, sizeof(*ops));
- backends[num_backends].ops->name = smb_xstrdup(ops->name);
+ new_ops = smb_xmemdup(ops, sizeof(*ops));
+ new_ops->name = smb_xstrdup(ops->name);
+
+ backends[num_backends].ops = new_ops;
num_backends++;
@@ -73,7 +76,7 @@ static NTSTATUS ntvfs_register(void *_ops)
/*
return the operations structure for a named backend of the specified type
*/
-struct ntvfs_ops *ntvfs_backend_byname(const char *name, enum ntvfs_type type)
+const struct ntvfs_ops *ntvfs_backend_byname(const char *name, enum ntvfs_type type)
{
int i;