1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

493 Commits

Author SHA1 Message Date
Günther Deschner
09ec85715b s3-net: make sure to call libnetapi init functions at the top of "net rpc" command.
Without the initialization "net rpc password" will prompt twice for passwords
and will not allow to define the name of the connection admin user.

In the long run we should probably only have one place where to initialize
libnetapi.

Kai, please check.

Guenther
2009-04-28 12:16:38 +02:00
Günther Deschner
38264bb3b8 s3-secdesc: move all winreg access bits to IDL.
Guenther
2009-04-21 12:42:51 +02:00
Günther Deschner
b5bec1a6d7 s3-secdesc: use SEC_FLAG_MAXIMUM_ALLOWED instead of SEC_RIGHTS_MAXIMUM_ALLOWED.
Guenther
2009-04-21 12:40:47 +02:00
Andrew Bartlett
6c9caed481 Merge commit 'origin/master' into libcli-auth-merge-without-netlogond 2009-04-20 16:53:02 +02:00
Stefan Metzmacher
c0dfe0cf80 s3:net_rpc: don't shutdown a cli_state passed from the caller
This fixes a crash bug if we timeout in net rpc trustdom list.

metze
2009-04-17 21:46:46 +02:00
Jeremy Allison
d9804ae3cc Fix bug #6089 - Winbind samr_OpenDomain not possible with Samba 3.2.6+
What a difference a name makes... :-). Just because something is missnamed
SAMR_ACCESS_OPEN_DOMAIN, when it should actually be SAMR_ACCESS_LOOKUP_DOMAIN,
don't automatically use it for a security check in _samr_OpenDomain().
Jeremy.
2009-04-15 15:40:00 -07:00
Andrew Bartlett
f28f113d8e Rework Samba3 to use new libcli/auth code (partial)
This commit is mostly to cope with the removal of SamOemHash (replaced
by arcfour_crypt()) and other collisions (such as changed function
arguments compared to Samba3).

We still provide creds_hash3 until Samba3 uses the credentials code in
netlogon server

Andrew Bartlett
2009-04-14 16:23:35 +10:00
Günther Deschner
73030b107d s3-net: Fix Coverity #861 (UNINIT).
Guenther
2009-03-20 11:07:21 +01:00
Günther Deschner
d2fb6d3482 s3-net: Fix Coverity #898 (UNINIT).
Guenther
2009-03-20 11:04:59 +01:00
Günther Deschner
531af136f9 s3: remove POLICY_HND.
Guenther
2009-03-18 23:22:29 +01:00
Günther Deschner
9fdeb7f7b3 s3-spoolss: remove custom syntax_spoolss and use the syntax defined in IDL.
Guenther
2009-03-18 14:18:42 +01:00
Jeremy Allison
8dd1faaa29 Remove the global "struct cm_cred_struct" and associated calls, make
callers pass in a struct user_auth_info * instead. This commit causes
smbc_set_credentials() to print out a message telling callers to use
smbc_set_credentials_with_fallback() instead, as smbc_set_credentials()
has a broken API (no SMBCCTX * pointer). No more global variables used
in the connection manager API for client dfs calls.
Jeremy.
2009-03-17 14:53:06 -07:00
Günther Deschner
7c3ba34788 s3: use samr_RidWithAttribute instead of DOM_GID.
Guenther
2009-02-05 00:47:06 +01:00
Günther Deschner
0016c57ca1 s3-net: remove unused ENUM_HND.
Guenther
2009-02-05 00:40:59 +01:00
Volker Lendecke
3cd8c121dc Fix some type-punned warnings 2009-02-01 14:34:22 +01:00
Volker Lendecke
57de60a83f cli_get_pipe_name_from_interface does not really need a talloc_ctx 2009-02-01 14:34:22 +01:00
Volker Lendecke
0bd92281e4 Make cli_tcon_andx async 2009-01-30 12:47:59 +01:00
Volker Lendecke
3b34486f6a Actually complete 3662c2b... 2009-01-22 12:13:55 +01:00
todd stecher
989ad44d32 Memory leaks and other fixes found by Coverity 2009-01-21 17:13:03 -08:00
Günther Deschner
46f55ef5bc s3-samr: avoid all init_samr_user* functions.
Guenther
2009-01-06 16:02:10 +01:00
Jeremy Allison
07e0094365 Fix all warnings in source3 with gcc4.3.
Jeremy.
2008-12-31 18:06:57 -08:00
Volker Lendecke
bb8ca0fdbf Make cli_negprot return NTSTATUS instead of bool 2008-12-19 10:28:30 +01:00
Günther Deschner
7423b6a4b8 s3-samr: fix SAMR_FIELD_PASSWORD callers.
Guenther
2008-12-05 14:27:03 +01:00
Stefan Metzmacher
2b8f3e253d s3:net: fix password set of 'net rpc trustdom add'
metze
2008-12-04 12:27:57 +01:00
Günther Deschner
4d7485df96 s3-samr: fix init_samr_user_info{23,24} callers.
Guenther
2008-11-28 13:55:38 +01:00
Günther Deschner
9f86dd715a s3-net: add "net rpc vampire passdb" that allows to take arguments.
Guenther
2008-11-18 16:03:05 +01:00
Jelmer Vernooij
ddcab787c4 Rename dos_errstr() to win_errstr() for consistency with Samba 4. 2008-11-01 17:19:26 +01:00
Günther Deschner
f126371f17 s3-samr: remove duplicate copies of Domain Object specific access rights.
Guenther
2008-10-31 21:14:27 +01:00
Günther Deschner
700cece822 s3-samr: remove duplicate copies of SAM server specific access rights.
Guenther
2008-10-31 21:14:26 +01:00
Jeremy Allison
8344e94574 Unify se_access_check with the S4 code. Will make
calculation of SEC_FLAG_MAXIMUM_ALLOWED much easier
for files.
Jeremy.
2008-10-31 10:51:45 -07:00
Jelmer Vernooij
f9fb9436ae Use WERR_FILE_EXISTS which is the equivalent of WERR_ALREADY_EXISTS
previously present in Samba 3.
2008-10-23 15:37:39 +02:00
Jeremy Allison
4e9db0b100 Cope with MAXIMUM_ALLOWED_ACCESS requests when opening handles.
Jeremy.
2008-10-21 18:05:48 -07:00
Günther Deschner
65dc1eeceb s3: fix various samr callers.
Guenther
2008-10-15 17:11:27 +02:00
Jelmer Vernooij
881b36f4cf Share initshutdown.idl. 2008-10-15 16:13:02 +02:00
Kai Blin
694786b23c net: Make share type lookup a function. 2008-09-26 20:52:13 +02:00
Günther Deschner
cf1e3e5579 net: use netapi for NetFileEnum.
Guenther
(This used to be commit f85dcf8112)
2008-09-11 14:38:22 +02:00
Günther Deschner
e10a7af3c6 net: use netapi for NetFileClose.
Guenther
(This used to be commit fd3d130d25)
2008-09-11 14:38:12 +02:00
Günther Deschner
a780ed8970 net: use netapi for NetShareEnum.
Guenther
(This used to be commit f4cb75b1e2)
2008-09-11 14:21:48 +02:00
Kai Blin
5b54781e1c net: share_type is defined in net_rap.c, net_rpc.c needs to use that.
This fixes a crash in net rpc share that Günther Deschner found.
(This used to be commit 50af6d609d)
2008-09-10 12:05:18 +02:00
Günther Deschner
cb2d7aa827 net: use netapi for rpc_sh_share_delete as well.
Guenther
(This used to be commit b56ec0b995)
2008-09-05 12:35:11 +02:00
Günther Deschner
f9294970b4 net: use netapi for deleting shares.
Guenther
(This used to be commit d7b07b6369)
2008-09-05 12:34:58 +02:00
Günther Deschner
d07f0e345e net: use netapi for rpc_sh_share_add as well.
Guenther
(This used to be commit 0c23274256)
2008-09-05 12:32:56 +02:00
Günther Deschner
04e363c961 net: use netapi to add shares.
Guenther
(This used to be commit 95ac480e20)
2008-09-05 12:32:56 +02:00
Günther Deschner
a9a9772b5d net: use netapi for "net rpc user info" to enumerate user group membership.
Guenther
(This used to be commit 77ecfff216)
2008-08-29 13:57:59 +02:00
Günther Deschner
e2945c38f1 net: use netapi function to set user password.
Guenther
(This used to be commit f31fd1e112)
2008-08-29 13:57:58 +02:00
Günther Deschner
badc46d16e net: use netapi function to list users.
Guenther
(This used to be commit 6bc8e22919)
2008-08-29 13:57:58 +02:00
Günther Deschner
eefd04212c net: use netapi for rpc_user_rename.
Guenther
(This used to be commit fe28ea1afd)
2008-08-29 13:57:53 +02:00
Günther Deschner
52a8501515 netapi: when using NetApi functions forward net's kerberos setting.
Guenther
(This used to be commit d46f648d2e)
2008-07-31 15:26:15 +02:00
Günther Deschner
23e9ebb0d4 net: Use NetLocalGroupAdd() for adding aliases.
Guenther
(This used to be commit 2ed4ce0bf1)
2008-07-31 15:15:55 +02:00
Günther Deschner
9294303943 rpc_client: use init_samr_CryptPassword(Ex) in client tools.
Guenther
(This used to be commit 97f7f9f21f)
2008-07-31 13:52:33 +02:00
Volker Lendecke
05cc3fda05 Refactoring: connect_dst_pipe uses ndr_syntax_id instead of pipe_idx
(This used to be commit 0f77746f36)
2008-07-21 14:36:28 +02:00
Volker Lendecke
d86ff59989 Refactoring: net_sh_run uses ndr_syntax_id instead of pipe_idx
(This used to be commit 85c8363d51)
2008-07-21 14:36:28 +02:00
Volker Lendecke
f23567fcb9 Refactoring: run_rpc_command uses ndr_syntax_id instead of pipe_idx
(This used to be commit 850166ec0d)
2008-07-21 14:36:28 +02:00
Volker Lendecke
99526d391d Refactoring: Change calling conventions for cli_rpc_pipe_open_schannel
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit 1fcfca007f)
2008-07-20 17:37:14 +02:00
Volker Lendecke
e0be03d8d5 Refactoring: Change calling conventions for cli_rpc_pipe_open_ntlmssp
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit a13f059955)
2008-07-20 17:37:11 +02:00
Volker Lendecke
1335da2a7c Refactoring: Change calling conventions for cli_rpc_pipe_open_noauth
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit 9abc9dc4dc)
2008-07-20 17:37:11 +02:00
Volker Lendecke
3353565faf Fix the build
(This used to be commit 242077f714)
2008-06-28 10:38:51 +02:00
Jeremy Allison
f083c1f57e Fix bug #5568 net rpc trustdom add broken !
net rpc trustdom add was broken. The default 10second timeout can be too short
to create an account on a Samba DC (calling out to a script), error message
reporting was poor, and more importantly the new marshalling code for
user_info23 was broken (maps onto a user_info21 but doesn't clear the
user_info23 struct before marshalling, leaving an uninitialized size field -
give "alloc failure").
Jeremy.
(This used to be commit e072b3667e)
2008-06-27 17:26:41 -07:00
Jeremy Allison
23e4a41362 Fix usage message for net rpc trustdom add.
Jeremy.
(This used to be commit 20e59faf6e)
2008-06-27 15:28:45 -07:00
Günther Deschner
a8332b91ef net: add basic support for sealed RPC connections (using NET_FLAGS_SEAL).
Guenther
(This used to be commit 7541a0103a)
2008-06-24 23:45:09 +02:00
Günther Deschner
adef1b004b net_vampire: add code to vampire a SAM database to a keytab file.
Guenther
(This used to be commit ee6e422c0e)
2008-06-24 23:40:14 +02:00
Günther Deschner
8049d3aa8e net_vampire: split out rpc_vampire_ldif().
Guenther
(This used to be commit bcc6d3a0eb)
2008-06-13 23:39:09 +02:00
Karolin Seeger
49a81672d2 net: Fix several typos in comments.
-argc -> argv (where argv is meant)
-destoyed -> destroyed
-compleation -> completion
-aquired -> acquired
-Unify spelling of some words like rpc-server -> RPC server.
-Add missing punctuation marks.

Karolin
(This used to be commit f4850c37df)
2008-06-12 10:59:02 +02:00
Kai Blin
255bdb2602 net: Rename functable3 to functable, get rid of old functables
(This used to be commit bb7c5fc4ec)
2008-06-10 09:48:21 +02:00
Kai Blin
c51ca559c1 net: Make "net rpc" use functable3
(This used to be commit 428b56863c)
2008-06-10 09:47:28 +02:00
Günther Deschner
a3353677d3 netapi: use NetGroupSetInfo() for "net rpc group rename".
Guenther
(This used to be commit 8a4577ebb0)
2008-06-06 13:59:09 +02:00
Günther Deschner
2bad004f8a net: Use NetGroupAdd() for adding domain groups.
Guenther
(This used to be commit 3f0ce34c62)
2008-06-03 01:27:41 +02:00
Jeremy Allison
5e4d4c8ace A few cleanups from Chere Zhou <chere.zhou@isilon.com>.
Jeremy.

Conflicts:

	source/utils/net_rap.c
	source/utils/net_rpc.c
(This used to be commit ac0c2fb6e8)
2008-05-27 13:56:55 -07:00
Kai Blin
0210f7af91 net: The top level help function for net cmd is always net_cmd_usage
(This used to be commit f7d0903a58)
2008-05-20 14:28:12 +02:00
Kai Blin
1634bd92ea net: Move printer help to net_rpc where it's used.
(This used to be commit 2ee3d1aefa)
2008-05-20 14:28:03 +02:00
Kai Blin
f9a6d1f264 net: Split out "net share"
(This used to be commit 25d4c6f692)
2008-05-20 14:28:01 +02:00
Kai Blin
c9ca6092fe net: Split out "net file"
(This used to be commit 84a116be9c)
2008-05-20 14:27:47 +02:00
Kai Blin
007f0e19dc net: Split out "net group"
(This used to be commit 3ddd9c09e3)
2008-05-20 14:27:40 +02:00
Kai Blin
572de942c7 net: Split out "net user"
(This used to be commit 4ca08a5acc)
2008-05-20 14:27:27 +02:00
Kai Blin
16938883e6 net: Use true/false instead of True/False.
(This used to be commit a8b567aac3)
2008-05-20 14:27:08 +02:00
Kai Blin
4206d97544 net: more whitespace cleanup
(This used to be commit ef0184d580)
2008-05-10 09:22:31 +02:00
Kai Blin
f576910944 net: Remove globals
(This used to be commit 1e9319cf88)
2008-05-10 09:22:27 +02:00
Volker Lendecke
b78453326b Remove the "pwd" struct from rpc_pipe_client
The only user of this was decrypt_trustdom_secret, and this only needs the NT
hash anyway.
(This used to be commit 3d8c2a47e6)
2008-04-21 23:36:05 +02:00
Günther Deschner
ba0bf87d96 net: Add libnetapi context to net's impressive list of globals.
Guenther
(This used to be commit 8a5fadf6a1)
2008-04-21 20:21:40 +02:00
Volker Lendecke
b9cc055062 Introduce rpc_pipe_np_smb_conn()
This abstracts away all references to rpc_pipe_client->cli, the only reference
is now in cli_pipe.c.
(This used to be commit c56e1c08ce)
2008-04-20 14:08:16 +02:00
Volker Lendecke
e73e8297f5 Replace cli_rpc_pipe_close by a talloc destructor on rpc_pipe_struct
(This used to be commit 99fc3283c4)
2008-04-20 14:08:16 +02:00
Volker Lendecke
2a2188591b Add "desthost" to rpc_pipe_client
This reduces the dependency on cli_state
(This used to be commit 783afab9c8)
2008-04-20 00:13:09 +02:00
Günther Deschner
409e093334 net: Remove unused rpc_user_add/del_internals code.
Guenther
(This used to be commit e68daef0ee)
2008-04-16 10:09:07 +02:00
Günther Deschner
004c2beef4 net: Use NetUserAdd for "net rpc user add".
Guenther
(This used to be commit 4868b4ea1a)
2008-04-16 02:41:52 +02:00
Günther Deschner
cd87be5ba2 net: use NetUserDel for "net rpc user delete".
Guenther
(This used to be commit 0105770c15)
2008-04-16 02:39:41 +02:00
Karolin Seeger
a8124367b4 Fix typos.
Karolin
(This used to be commit 6cee347035)
2008-04-09 16:14:04 +02:00
Günther Deschner
8d0ad6413e Fix parameters string for rpc_trustdom_add_internals().
Guenther
(This used to be commit e161bb64a8)
2008-04-09 13:18:46 +02:00
Günther Deschner
81579895a6 Fix lsa_TrustedDomainInfo callers.
Guenther
(This used to be commit e0eae39017)
2008-04-08 22:55:52 +02:00
Stefan Metzmacher
74325d79ad net_rpc: let get_user_sids() use wbcLookupName(), wbcGidToSid() and wbcGetGroups()
metze
(This used to be commit 31375c0263)
2008-04-06 13:43:28 +02:00
Stefan Metzmacher
1e39a6196c net_rpc: let get_user_tokens() use wbcListUsers()
metze
(This used to be commit 4f712452e9)
2008-04-06 13:43:28 +02:00
Günther Deschner
832adaa5ab Fix "net rpc trustdom establish" for win2k8 trusts.
When establishing trusts to a windows 2008 dc, the NetServerEnum2 RAP call fails
with some exotic RAP failure. Let's just try a netlogon getdcname call in
that case to convince ourselve we're talking to a proper machine.

Rafael, looks ok?

Guenther
(This used to be commit b12edbeffe)
2008-04-02 12:29:24 +02:00
Günther Deschner
003472ae23 Fix SRVSVC NetShareInfo level 502 client-side.
Guenther
(This used to be commit 8b4eac0ab1)
2008-04-01 00:26:32 +02:00
Volker Lendecke
c5356479c1 Some simplifications
(This used to be commit b59b436997)
2008-03-17 21:10:16 +01:00
Marc VanHeyningen
e06aa46b9f Coverity fixes
(This used to be commit 3fc85d2259)
2008-03-17 20:52:25 +01:00
Günther Deschner
cfa16eaca0 Use rpccli_srvsvc_NetFileEnum in net and rpcclient.
Guenther
(This used to be commit 348af272f7)
2008-03-10 17:08:55 +01:00
Günther Deschner
b7b89bf808 Convert "net" to use rpccli_srvsvc_NetShare* interfaces everywhere.
Guenther
(This used to be commit 3b21ee3738)
2008-03-10 16:19:25 +01:00
Günther Deschner
758ceaaaaf Use rpccli_srvsvc_NetShareAdd in net.
Guenther
(This used to be commit 6686d97617)
2008-03-10 14:46:27 +01:00
Günther Deschner
0f64ce0179 Use rpccli_srvsvc_NetShareGetInfo in 2 places in "net".
Guenther
(This used to be commit 2ce76ce2bc)
2008-03-10 05:17:09 +01:00
Günther Deschner
8e1fe6379d Use rpccli_srvsvc_NetShareDel in net.
Guenther
(This used to be commit 10d457152e)
2008-03-07 23:51:34 +01:00
Günther Deschner
7269a504fd Add my copyright.
Guenther
(This used to be commit d078a87571)
2008-02-27 19:38:48 +01:00
Karolin Seeger
79fa62a1bf Fix some typos.
Karolin
(This used to be commit 71f05a1f96)
2008-02-26 10:26:10 +01:00
Günther Deschner
a2c0ca84d5 Remove const on policy handle in net rpc.
Volker, are you ok with that?

Guenther
(This used to be commit f1c7fa19e4)
2008-02-13 14:17:29 +01:00
Günther Deschner
0ba3d44f73 Use rpccli_lsa_EnumTrustDom all over the place.
Guenther
(This used to be commit a25e7ffbca)
2008-02-13 00:29:37 +01:00
Günther Deschner
e2b3aad817 Collect all init_lsa_string varients in one place.
Guenther
(This used to be commit f4581e9f44)
2008-02-12 22:05:39 +01:00
Günther Deschner
68855a99d0 Use rpccli_samr_SetUserInfo2() in place of rpccli_samr_set_userinfo().
Guenther
(This used to be commit 1b48b9d73d)
2008-02-12 20:29:13 +01:00
Günther Deschner
bc742a06a2 Remove all callers of rpccli_samr_setuserinfo2 and replace with
rpccli_samr_SetUserInfo (see the opcode mixup in rpc_samr.h).

Guenther
(This used to be commit bdc4918503)
2008-02-12 18:53:59 +01:00
Günther Deschner
4c42f7999a Use rpccli_samr_QueryUserInfo in net and winbindd.
Guenther
(This used to be commit a9ff676090)
2008-02-12 18:16:56 +01:00
Günther Deschner
b88982a5c8 Use rpccli_samr_EnumDomainUsers in net and rpcclient.
Guenther
(This used to be commit bcf2cd324c)
2008-02-12 11:36:33 +01:00
Günther Deschner
cf20a28dd6 Use rpccli_samr_EnumDomainAliases() in net and rpcclient.
Guenther
(This used to be commit d034d34faa)
2008-02-12 11:10:59 +01:00
Volker Lendecke
885b16cd77 Remove a bogus comment
(This used to be commit 599bb7e470)
2008-02-12 11:09:54 +01:00
Günther Deschner
90631dd2c2 Removing unused ACCT_-flags.
Guenther
(This used to be commit d1e5a5a7f9)
2008-02-12 09:48:47 +01:00
Günther Deschner
7e4423288a Use rpccli_samr_LookupNames() in net rpc.
Guenther
(This used to be commit 38b6351534)
2008-02-08 15:30:35 +01:00
Karolin Seeger
1af4ee51ad Fix typo.
Karolin
(This used to be commit ae9d386bcc)
2008-02-08 14:08:49 +01:00
Günther Deschner
e3757bcd1b Use rpccli_samr_LookupRids() in net and rpcclient.
Guenther
(This used to be commit 72fc4ffa38)
2008-02-08 12:07:06 +01:00
Günther Deschner
7520439dca Use rpccli_lsa_QueryInfoPolicy() all over the place.
Guenther
(This used to be commit ce22abcea3)
2008-02-08 10:26:20 +01:00
Günther Deschner
e1af5066d5 Remove unused marshalling for SAMR_QUERY_DISPINFO.
Guenther
(This used to be commit c09e619a58)
2008-02-08 00:17:54 +01:00
Günther Deschner
781776d864 Use rpccli_samr_QueryDisplayInfo() all over the place.
Guenther
(This used to be commit 66b79add35)
2008-02-08 00:10:55 +01:00
Günther Deschner
1c788bc365 Use rpccli_samr_GetGroupsForUser() all over the place.
Guenther
(This used to be commit d1c669920e)
2008-02-07 14:25:18 +01:00
Günther Deschner
ba9cda7ad9 Use rpccli_samr_QueryAliasInfo() in net.
Guenther
(This used to be commit 5bf6c8b6d8)
2008-02-07 13:37:59 +01:00
Günther Deschner
1500538ae8 Use rpccli_samr_SetGroupInfo() in net.
Guenther
(This used to be commit 5909e9f971)
2008-02-07 11:03:35 +01:00
Günther Deschner
32ca0e8147 Use rpccli_samr_SetAliasInfo() in net.
Guenther
(This used to be commit 18c52030bb)
2008-02-07 10:56:24 +01:00
Günther Deschner
b0374e6b34 Use rpccli_samr_QueryDomainInfo() in net rpc.
Guenther
(This used to be commit 82073db9f7)
2008-02-06 02:09:04 +01:00
Günther Deschner
fc681ec581 Use rpccli_samr_RemoveMemberFromForeignDomain() in net.
Guenther
(This used to be commit 91c48ae15b)
2008-02-05 13:19:47 +01:00
Günther Deschner
2823c1eab1 Use rpccli_samr_QueryGroupMember() all over the place.
Guenther
(This used to be commit 1793ed10df)
2008-02-05 13:19:47 +01:00
Günther Deschner
2e73c54fe3 Use rpccli_samr_GetMembersInAlias() in net and rpcclient.
Guenther
(This used to be commit 3f48f9e671)
2008-02-05 10:05:53 +01:00
Günther Deschner
f22e45c8a2 Use rpccli_samr_AddAliasMember() in net.
Guenther
(This used to be commit 390597c96c)
2008-02-05 10:01:27 +01:00
Günther Deschner
698edf4d80 Use rpccli_samr_DeleteAliasMember() in net.
Guenther
(This used to be commit b04bf5c125)
2008-02-05 09:58:23 +01:00
Günther Deschner
270ba9c238 Use rpccli_samr_Connect2() all over the place.
Guenther
(This used to be commit bdf8d56262)
2008-02-04 22:12:40 +01:00
Günther Deschner
babf5d5f5c Use rpccli_samr_AddGroupMember() in net.
Guenther
(This used to be commit e2635fa1e4)
2008-02-04 18:45:25 +01:00
Günther Deschner
db5054fd99 Use rpccli_samr_DeleteGroupMember() in net.
Guenther
(This used to be commit 4e1496894b)
2008-02-04 18:32:34 +01:00
Günther Deschner
ddbe4ea6b7 Use rpccli_samr_CreateUser2() all over the place.
Guenther
(This used to be commit 701af69118)
2008-02-01 16:29:20 +01:00
Günther Deschner
cc1350a353 Use rpccli_samr_CreateDomainGroup() in net and rpcclient.
Guenther
(This used to be commit 7b7b10adca)
2008-02-01 16:29:20 +01:00
Günther Deschner
99ebfd810f Use rpccli_samr_CreateDomAlias() in net and rpcclient.
Guenther
(This used to be commit 1248ec89d2)
2008-02-01 16:29:20 +01:00
Günther Deschner
37b56c0113 Use rpccli_samr_OpenUser() all over the place.
Guenther
(This used to be commit da90eb7653)
2008-02-01 12:30:15 +01:00
Günther Deschner
2c7428e64e Use rpccli_samr_OpenAlias() in net and rpcclient.
Guenther
(This used to be commit f66facc0f8)
2008-02-01 12:29:58 +01:00
Günther Deschner
482eaa8e5c Use rpccli_samr_OpenGroup() all over the place.
Guenther
(This used to be commit d019fc69a9)
2008-02-01 12:29:35 +01:00
Günther Deschner
42960f817a Use rpccli_samr_OpenDomain() all over the place.
Guenther
(This used to be commit e4e9d72724)
2008-02-01 12:29:10 +01:00
Günther Deschner
e4a64da293 Use rpccli_samr_DeleteUser() in net and rpcclient.
Guenther
(This used to be commit 5bd8f7067d)
2008-02-01 10:17:38 +01:00
Günther Deschner
e33db782d2 Use rpccli_samr_DeleteDomAlias() in net and rpcclient.
Guenther
(This used to be commit bbed3aed51)
2008-02-01 10:15:39 +01:00
Günther Deschner
8303e8cf80 Use rpccli_samr_DeleteDomainGroup() in net and rpcclient.
Guenther
(This used to be commit 8cc094ddb5)
2008-02-01 10:14:10 +01:00
Günther Deschner
5334b364c2 Remove rpccli_samr_close and use pidl generated function instead.
Guenther
(This used to be commit 64f0889401)
2008-01-31 11:09:11 +01:00
Günther Deschner
92183450f1 Trying to avoid defining new SAMR acct creation flags when we already have them with different
names. Matt, Jeremy, please check.

Guenther
(This used to be commit d4a9e46edf)
2008-01-25 01:04:30 +01:00
Jeremy Allison
a0186fb78d Forward ported version of Matt Geddes <musicalcarrion@gmail.com>
patch for adding acct_flags to rpccli_samr_create_dom_user().
Jerry please test.
Jeremy.
(This used to be commit 7d94f97947)
2008-01-23 13:54:02 -08:00
Günther Deschner
c920764b19 Apply const to rpccli_lsa_query_info_policy() and rpccli_lsa_query_info_policy2().
Guenther
(This used to be commit 7a3fe68bef)
2008-01-15 16:40:22 +01:00
Günther Deschner
cb1a090577 Use pidl generated rpccli_lsa_QueryTrustedDomainInfoBySid when vampiring trusted
domain secrets.

Guenther
(This used to be commit aa3de6f9f5)
2008-01-14 15:33:42 +01:00
Karolin Seeger
9dfde0ebec Improve error messages of 'net rpc user [add|delete]' commands.
Karolin
(This used to be commit 4260c79bf7)
2007-12-28 09:44:40 +01:00
Volker Lendecke
2e07c2ade8 s/sid_to_string/sid_to_fstring/
least surprise for callers
(This used to be commit eb523ba776)
2007-12-15 22:47:30 +01:00
Volker Lendecke
7b01537679 Replace sid_string_static with sid_string_tos
In utils/ I was a bit lazy...
(This used to be commit 60e830b0f4)
2007-12-15 22:09:36 +01:00
Volker Lendecke
900288a2b8 Replace sid_string_static by sid_string_dbg in DEBUGs
(This used to be commit bb35e794ec)
2007-12-15 22:09:36 +01:00
Günther Deschner
0439fdd777 Replace "unknown" with access_mask when calling samr_CreateUser2().
Guenther
(This used to be commit cfc6e7a2e6)
2007-12-11 15:26:09 +01:00
Jeremy Allison
42cfffae80 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f3936)
2007-12-07 17:32:32 -08:00
Jeremy Allison
e262c41c61 More pstring elimination.
Jeremy.
(This used to be commit c1f70793d6)
2007-12-04 16:35:24 -08:00
Jeremy Allison
fe1a12b22f Remove pstring from clirap2 by completely rewriting the damn
thing :-). Now with added paranoia.
Jeremy.
(This used to be commit b6b5f92bc9)
2007-12-03 14:09:48 -08:00
Günther Deschner
6f1b4eb869 Fix shutdown callers.
Guenther
(This used to be commit de2fdc6b5a)
2007-12-03 18:43:19 +01:00
Günther Deschner
9ab0038348 Fix svcctl callers.
Guenther
(This used to be commit 91bf2ac1af)
2007-12-03 18:43:19 +01:00
Günther Deschner
e9e182feda Actually implement reboot feature for net dom join/unjoin.
Guenther
(This used to be commit bbbeeba163)
2007-12-03 11:17:57 +01:00
Jeremy Allison
f692694b99 Remove PSTRING_LEN from smbd/ nmbd/.
Remove pstring from libsmb/clidfs.c except for a nasty
hack (that will be removed when pstrings are gone from
client/).
Jeremy.
(This used to be commit cc257b71d1)
2007-11-29 17:25:41 -08:00
Jeremy Allison
6b6655edd9 Remove pstrings from everything except srv_spoolss_nt.c.
Jeremy.
(This used to be commit 0002a9e96b)
2007-11-27 14:35:30 -08:00
Jeremy Allison
f88b7a076b This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
(This used to be commit 98e154c312)
2007-10-24 14:16:54 -07:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
Volker Lendecke
e3d07ff9fe r25499: Fix rpc_file_list_internals
(This used to be commit da5736f210)
2007-10-10 12:31:10 -05:00
Volker Lendecke
4a952fb0c0 r25481: Fix some typos, don't panic as non-root on net getdomainsid
Thanks to Karolin Seeger <ks@sernet.de>
(This used to be commit 5ae4b27398)
2007-10-10 12:31:07 -05:00
Michael Adam
c97fe37ea3 r25294: Tidy up callers of unistr2_to_ascii() to pass sizeof(target_area) to
the maxeln parameter instead of sizeof(target_area) - 1 (or even
sizeof(fstring) - 1 in some places.

I hope these were really all there were.

Michael
(This used to be commit 9a28be220d)
2007-10-10 12:30:58 -05:00
Michael Adam
1130482add r25197: Change net_make_ipc_connection() and net_make_ipc_connection_ex() to
return NTSTATUS to allow for better error propagation.

Michael
(This used to be commit 46093004a7)
2007-10-10 12:30:50 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Volker Lendecke
161ebbc17a r23757: Fix Coverity id 386
(This used to be commit 91be38f7ab)
2007-10-10 12:23:53 -05:00
Günther Deschner
7eb828135b r23627: Allow to pass down the lookup-level to rpccli_lsa_lookup_names().
Guenther
(This used to be commit e9a7512a9f)
2007-10-10 12:23:38 -05:00
Jeremy Allison
ce02d0dfcb r23554: Fix bug #4711 by makeing cli_connect return an NTSTATUS.
Long overdue fix....
Jeremy.
(This used to be commit 073fdc5a58)
2007-10-10 12:23:28 -05:00
Alexander Bokovoy
1f073a0319 r22867: With Samba4's IDL, we now have two new flags for share types: STYPE_TEMPORARY and STYPE_HIDDEN
Strip them out when referencing share_type[] entries.

Apparently, some Windows XP installs create shares set to STYPE_HIDDEN by default, found by
Damir Shayhutdinov <damir@altlinux.org>. This also fixes smb4k crashes as it does call 'net share -l'.
(This used to be commit c3f4fdd37e)
2007-10-10 12:22:04 -05:00
Jeremy Allison
540911001d r21768: Fix the client dfs code such that smbclient can
process deep dfs links (ie. links that go to non root
parts of a share). Make the directory handling conanonical
in POSIX and Windows pathname processing.
dfs should not be fully working in client tools. Please
bug me if not.
Jeremy.
(This used to be commit 1c9e10569c)
2007-10-10 12:18:30 -05:00
Jeremy Allison
aab1dd4ddb r21755: Memory leak fixes from Zack Kirsch <zack.kirsch@isilon.com>.
Jeremy.
(This used to be commit 02d08ca0be)
2007-10-10 12:18:28 -05:00
Jeremy Allison
8e00e9d7a6 r21609: Fix memory leaks in error code paths (and one in winbindd_group.c).
Patch from Zack Kirsch <zack.kirsch@isilon.com>.
Jeremy.
(This used to be commit df07a662e3)
2007-10-10 12:18:16 -05:00
Jeremy Allison
57881f7494 r20917: Fix missing error returns pointed out by "Li, Ying (ESG)" <ying.li2@hp.com>
Jeremy.
(This used to be commit 78387b3cd2)
2007-10-10 12:17:20 -05:00
Jelmer Vernooij
62e11c4f17 r20832: Remove extra pointers previously added to unique [out] pointers. Instead,
add [ref] pointers where necessary (top-level [ref] pointers,
by spec, don't appear on the wire).

This brings us closer to the DCE/RPC standard again.
(This used to be commit 580f2a7197)
2007-10-10 12:17:11 -05:00
Volker Lendecke
b906886e9e r20824: Send access to the trusted domain passwords through the pdb backend, so that
in the next step we can store them in LDAP to be replicated across DCs.

Thanks to Michael Adam <ma@sernet.de>

Volker
(This used to be commit 3c879745cf)
2007-10-10 12:17:10 -05:00
Volker Lendecke
01367cdfd0 r19797: Convert the remaining pipes to the "new" unique out ptr handling
(This used to be commit bc4e0a388a)
2007-10-10 12:15:56 -05:00
Volker Lendecke
f916352de9 r19447: Do not throw away information
(This used to be commit 141e0dd717)
2007-10-10 12:15:36 -05:00
Volker Lendecke
f29a0d90a3 r19446: Comment can be NULL now
(This used to be commit f4dcb9bd56)
2007-10-10 12:15:36 -05:00
Volker Lendecke
0dab687fce r19445: Attempt to fix net rpc share
(This used to be commit 769988f83a)
2007-10-10 12:15:36 -05:00
Gerald Carter
bbaa0b178d r18919: * Get the new rpccli_winreg_XXXX() functions into the tree
There some broken functionality here that I'm still working on.
* remove unneeded parsing routines
(This used to be commit cbfe1a4b49)
2007-10-10 12:14:46 -05:00
Andrew Tridgell
0c3194816b r18865: fixed some of the most obvious NTSTATUS/WERROR mixups in Samba3. It
still doesn't compile with immediate structures and the
NTSTATUS/WERROR separation, as there are still several places where
the two error types are mixed up. I haven't fixed those as they
require decisions about the rpcclient code that I really don't want to
get into (the error handling there is a mess)

So samba3 compiles now, but only becaise HAVE_IMMEDIATE_STRUCTURES is
not used (look for HAVE_IMMEDIATE_STRUCTURES_XX_DISABLED)
(This used to be commit 8438a6a7d4)
2007-10-10 12:01:06 -05:00
Jelmer Vernooij
7ba2554d88 r18802: Use the pidl-generated code for the srvsvc interface, both client and server code.
This has had some basic testing. I'll do more during the next couple of days and hopefully also
make RPC-SRVSVC from Samba4 pass against it.
(This used to be commit ef10672399)
2007-10-10 12:00:59 -05:00
Gerald Carter
05ba38f754 r18747: replace rpccli_lsa_close() with rpccli_lsa_Close()
(This used to be commit 50d74ce048)
2007-10-10 12:00:54 -05:00
Gerald Carter
8a1439b10d r18727: set the winreg_AbortSystemShutdown() server * to NULL rather than a dummy placeholder
(This used to be commit 92903ab926)
2007-10-10 12:00:52 -05:00
Gerald Carter
970d33c65a r18714: fix the build after replaceing rpccli_reg_abort_shutdown()
(This used to be commit 403b0cf1ec)
2007-10-10 12:00:51 -05:00
Volker Lendecke
f2e7b8d144 r18643: Fix a 64-bit warning
(This used to be commit bd17517796)
2007-10-10 11:52:03 -05:00
Gerald Carter
c4013df0c1 r18560: * Add in the winreg and initshutdown IDL files
* rename PI_SHUTDOWN from include/smb.h to PI_INITSHUTDOWN
  for compatibility with pidl libndr output
(This used to be commit 23a8828613)
2007-10-10 11:51:50 -05:00
Gerald Carter
2b27c93a9a r18271: Big change:
* autogenerate lsa ndr code
* rename 'enum SID_NAME_USE' to 'enum lsa_SidType'
* merge a log more security descriptor functions from
  gen_ndr/ndr_security.c in SAMBA_4_0

The most embarassing thing is the "#define strlen_m strlen"
We need a real implementation in SAMBA_3_0 which I'll work on
after this code is in.
(This used to be commit 3da9f80c28)
2007-10-10 11:51:18 -05:00
Jelmer Vernooij
995205fc60 r18188: merge 3.0-libndr branch
(This used to be commit 1115745cae)
2007-10-10 11:43:56 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Jeremy Allison
2b8abc030b r16644: Fix bug #3887 reported by jason@ncac.gwu.edu
by converting the lookup_XX functions to correctly
return SID_NAME_TYPE enums.
Jeremy.
(This used to be commit ee2b2d96b6)
2007-10-10 11:19:05 -05:00
Jeremy Allison
4471ce9a68 r16638: Fix bug #3885, reported by jason@ncac.gwu.edu. Use
the correct enumerated type in the macro.
Jeremy.
(This used to be commit 63ad19f71c)
2007-10-10 11:19:05 -05:00
Volker Lendecke
e7fc37cf0f r16360: Fix Klocwork ID 136 520 521 522 523 542 574 575 576 607
in net_rpc.c: 715 716 732 734 735 736 737 738 739 749

in net_rpc_audit.c: 754 755 756

in net_rpc_join.c: 757

in net_rpc_registry: 766 767

in net_rpc_samsync.c: 771 773

in net_sam.c: 797 798

Volker
(This used to be commit 3df0bf7d60)
2007-10-10 11:18:48 -05:00
Günther Deschner
bf9b5b9baf r16345: Improve the chance that our users can discover one of the coolest 'net'
features.

Guenther
(This used to be commit 446d79a000)
2007-10-10 11:17:37 -05:00
Günther Deschner
c893dfa500 r16344: Allow to set passwords directly when creating users via "net rpc user
add" (as the documentation says, and currently onle "net ads user add"
did). Fixes #3843.

Guenther
(This used to be commit 5d776d5fab)
2007-10-10 11:17:36 -05:00
Jeremy Allison
300acb99ad r16284: Start fixing up gcc4 -O6 warnings on an x86_64 box. size_t != unsigned
int
in a format string.
Jeremy.
(This used to be commit face01ef01)
2007-10-10 11:17:31 -05:00
Volker Lendecke
a835209278 r15657: Fix some Tru64 warnings
(This used to be commit a85dfb9eff)
2007-10-10 11:17:05 -05:00
Gerald Carter
2c029a8b96 r15543: New implementation of 'net ads join' to be more like Windows XP.
The motivating factor is to not require more privileges for
the user account than Windows does when joining a domain.

The points of interest are

* net_ads_join() uses same rpc mechanisms as net_rpc_join()
* Enable CLDAP queries for filling in the majority of the
  ADS_STRUCT->config information
* Remove ldap_initialized() from sam/idmap_ad.c and
  libads/ldap.c
* Remove some unnecessary fields from ADS_STRUCT
* Manually set the dNSHostName and servicePrincipalName attribute
  using the machine account after the join

Thanks to Guenther and Simo for the review.

Still to do:

* Fix the userAccountControl for DES only systems
* Set the userPrincipalName in order to support things like
  'kinit -k' (although we might be able to just use the sAMAccountName
  instead)
* Re-add support for pre-creating the machine account in
  a specific OU
(This used to be commit 4c4ea7b20f)
2007-10-10 11:16:57 -05:00