diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-02-03 11:10:56 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2004-02-03 11:10:56 +0000 |
commit | 1c798aba40fb0e389c7a54ad3d8f7d45876f2809 (patch) | |
tree | 3ee4790e25089106db52b1f16d20583f7bf90b9e /source4/passdb/pdb_guest.c | |
parent | a9b28120b84fd63e333d5be26fe8116c85f12c87 (diff) | |
download | samba-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/passdb/pdb_guest.c')
-rw-r--r-- | source4/passdb/pdb_guest.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/source4/passdb/pdb_guest.c b/source4/passdb/pdb_guest.c index 3f0f06d18d..11da975501 100644 --- a/source4/passdb/pdb_guest.c +++ b/source4/passdb/pdb_guest.c @@ -100,7 +100,7 @@ static NTSTATUS guestsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT return guestsam_getsampwrid(my_methods, user, rid); } -NTSTATUS pdb_init_guestsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, const char *location) +static NTSTATUS pdb_init_guestsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, const char *location) { NTSTATUS nt_status; @@ -121,3 +121,39 @@ NTSTATUS pdb_init_guestsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, c /* There's not very much to initialise here */ return NT_STATUS_OK; } + +NTSTATUS pdb_guest_init(void) +{ + NTSTATUS ret; + struct passdb_ops ops; + + ZERO_STRUCT(ops); + + /* fill in our name */ + ops.name = "guestsam"; + /* fill in all the operations */ + ops.init = pdb_init_guestsam; + + /* register ourselves with the PASSDB subsystem. */ + ret = register_backend("passdb", &ops); + if (!NT_STATUS_IS_OK(ret)) { + DEBUG(0,("Failed to register '%s' PASSDB backend!\n", + ops.name)); + return ret; + } + + /* fill in our name */ + ops.name = "guest"; + /* fill in all the operations */ + ops.init = pdb_init_guestsam; + + /* register ourselves with the PASSDB subsystem. */ + ret = register_backend("passdb", &ops); + if (!NT_STATUS_IS_OK(ret)) { + DEBUG(0,("Failed to register '%s' PASSDB backend!\n", + ops.name)); + return ret; + } + + return ret; +} |