diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-05-08 00:02:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:51:48 -0500 |
commit | 0ed08d9398d0ee8d9fdbc0f387415adc32ba675e (patch) | |
tree | 6a1dde58667248156c7fd47fb9e3f5aaa2466dec /source4/rpc_server/common | |
parent | a848b0e3e26a3c572bb32475352d460d247d85ee (diff) | |
download | samba-0ed08d9398d0ee8d9fdbc0f387415adc32ba675e.tar.gz samba-0ed08d9398d0ee8d9fdbc0f387415adc32ba675e.tar.bz2 samba-0ed08d9398d0ee8d9fdbc0f387415adc32ba675e.zip |
r578: initial server side implementation of samr_CreateUser(),
samr_CreateUser2(), samr_LookupNames(), samr_OpenUser(),
and samr_DeleteUser()
this uses a user template in the SAM db, of objectclass "userTemplate"
and dn CN=TemplateUser,CN=Templates,$BASEDN. Using a template allows
an admin to add any default user attributes that they might want to
the user template and all new users will receive those attributes.
(This used to be commit 10b6e0011b5952c98432dc2d4b2058ac89a9cc2d)
Diffstat (limited to 'source4/rpc_server/common')
-rw-r--r-- | source4/rpc_server/common/common.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/rpc_server/common/common.h b/source4/rpc_server/common/common.h index 17b76840af..afc238f6b6 100644 --- a/source4/rpc_server/common/common.h +++ b/source4/rpc_server/common/common.h @@ -34,3 +34,14 @@ /* a useful macro for checking the validity of a dcerpc policy handle and giving the right fault code if invalid */ #define DCESRV_CHECK_HANDLE(h) do {if (!(h)) DCESRV_FAULT(DCERPC_FAULT_CONTEXT_MISMATCH); } while (0) + +/* this checks for a valid policy handle, and gives a fault if an + invalid handle or NT_STATUS_INVALID_HANDLE if the handle is of the + wrong type */ +#define DCESRV_PULL_HANDLE(h, inhandle, t) do { \ + (h) = dcesrv_handle_fetch(dce_call->conn, (inhandle), DCESRV_HANDLE_ANY); \ + DCESRV_CHECK_HANDLE(h); \ + if ((t) != DCESRV_HANDLE_ANY && (h)->wire_handle.handle_type != (t)) { \ + return NT_STATUS_INVALID_HANDLE; \ + } \ +} while (0) |