Michael Adam
0f98b99483
dssync: record the bind info in the new remote_info28 in libnet_dssync_bind().
...
This extracts the info24 data in case this is what was returned (instead of info28).
E.g. windows 2000 returns info24.
Michael
(This used to be commit 61b41aa615
)
2008-08-01 16:04:41 +02:00
Michael Adam
55b2d50926
dssync: add a drsuapi_DsBindInfo28 struct to the dssync_context struct
...
to keep track of what the server told us upon DsBind.
Michael
(This used to be commit bf17d6af61
)
2008-08-01 16:04:40 +02:00
Michael Adam
9f6af6fe7c
dssync keytab: wrap printing of the uptodate vector in DEBUGLEVEL >= 10 checks
...
Michael
(This used to be commit 7fabe2567d
)
2008-08-01 16:04:40 +02:00
Michael Adam
0db26805da
dssync keytab: add support for keeping track of the up-to-date-ness vector.
...
The startup operation should get the old up-to-date-ness vector from the backend
and the finish operation should store the new vector to the backend after replication.
This adds the change of the signatures of the operations ot the dssync_ops struct
and the implementation for the keytab ops. The up-to-date-ness vector is stored
under the principal constructed as UTDV/$naming_context_dn@$dns_domain_name.
The vector is still uninterpreted in libnet_dssync_process().
This will be the next step...
This code is essentially by Metze.
Michael
(This used to be commit 01318fb27a
)
2008-08-01 16:04:40 +02:00
Michael Adam
54d6ae09e2
libnet_keytab: add a libnet_keytab_search() function
...
that searches and fetches an entry from a keytab file by principal and kvno.
This code is by metze.
Michael
(This used to be commit a51a60066b
)
2008-08-01 16:04:40 +02:00
Michael Adam
7bd3ea0b6f
dssync keytab: use add_to_keytab_entries() for pwd history in parse_object().
...
Michael
(This used to be commit 61f071de92
)
2008-08-01 16:04:40 +02:00
Michael Adam
764691fdd1
dssync keytab: add prefix parameter to add_to_keytab_entries() for flexibility.
...
This will allow to construct principals of the form PREFIX/name@domain
Michael
(This used to be commit 7dd32b56a6
)
2008-08-01 16:04:40 +02:00
Michael Adam
c1b9eb278f
dssync keytab: add check for success of ADD_TO_ARRAY().
...
Michael
(This used to be commit e6f6e61da4
)
2008-08-01 16:04:39 +02:00
Michael Adam
2473888daa
dssync keytab: refactor adding entry to keytab_context out into new function
...
add_to_keytab_entries()
Michael
(This used to be commit 79151db6ea
)
2008-08-01 16:04:39 +02:00
Michael Adam
16c2190b14
dssync: replace the processing_fn by startup/process/finish ops.
...
This remove static a variable for the keytab context in the keytab
processing function and simplifies the signature. The keytab context
is instead in the new private data member of the dssync_context struct.
This is in preparation of adding support for keeping track of the
up-to-date-ness vector, in order to be able to sync diffs instead
of the whole database.
Michael
(This used to be commit c51c3339f3
)
2008-08-01 16:04:39 +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
Tim Prouty
097b27dbcc
Enabled domain groups to be added to builtin groups at domain join time
...
Previously this was done at token creation time if the Administrators and Users
builtins hadn't been created yet. A major drawback to this approach is that if
a customer is joined to a domain and decides they want to join a different
domain, the domain groups from this new domain will not be added to the
builtins.
It would be ideal if these groups could be added exclusively at domain join
time, but we can't rely solely on that because there are cases where winbindd
must be running to allocate new gids for the builtins. In the future if there
is a way to allocate gids for builtins without running winbindd, this code
can be removed from create_local_nt_token.
- Made create_builtin_users and create_builtin_administrators non-static so
they can be called from libnet
- Added a new function to libnet_join that will make a best effort to add
domain administrators and domain users to BUILTIN\Administrators and
BUILTIN\Users, respectively. If the builtins don't exist yet, winbindd must be
running to allocate new gids, but if the builtins already exist, the domain
groups will be added even if winbindd is not running. In the case of a
failure the error will be logged, but the join will not be failed.
- Plumbed libnet_join_add_dom_rids_to_builtins into the join post processing.
(This used to be commit e92faf5996
)
2008-07-30 14:06:36 -07:00
Günther Deschner
3ea5c185ad
build: fix some no previous prototype warnings.
...
Guenther
(This used to be commit 51062534fd
)
2008-07-30 18:10:46 +02:00
Michael Adam
2bd58bf383
Change occurrences of the u1 member of DsBindInfo* to pid after idl change.
...
Michael
(This used to be commit 42f3d681ca
)
2008-07-22 16:28:13 +02:00
Volker Lendecke
ba2cb35ca5
Refactoring: Change calling conventions for cli_rpc_pipe_open_schannel_with_key
...
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit 78e9c937ff
)
2008-07-20 17:37:13 +02:00
Volker Lendecke
b8fc15be95
Refactoring: Make get_schannel_session_key return NTSTATUS
...
(This used to be commit a0793cc853
)
2008-07-20 17:37:12 +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
Günther Deschner
88b0b867cb
libnetjoin: make libnet_join_rollback() static.
...
Guenther
(This used to be commit f1cc39e375
)
2008-07-18 16:42:38 +02:00
Karolin Seeger
490b60b500
Use LDAP macros instead of attribute names.
...
Karolin
(This used to be commit 7dae8b04f1
)
2008-07-18 15:36:20 +02:00
Michael Adam
0bb7c0a5d9
dssync: fix missing prototype warning by including the proper header.
...
Michael
(This used to be commit 7d7b63e89b
)
2008-07-18 12:20:11 +02:00
Stefan Metzmacher
ddc0d9deb3
libnet_dssync: use ctr[1|6]->more_data
...
metze
(This used to be commit 6b7ddb6d66
)
2008-07-16 15:31:23 +02:00
Günther Deschner
2c703ec720
libnetjoin: fix Bug #5570 .
...
Thanks to Atte Peltomäki.
Guenther
(This used to be commit 144d374ad9
)
2008-07-03 12:02:01 +02:00
Günther Deschner
9b0e3bb0c3
net_vampire: add code to vampire to a Kerberos keytab file using DRSUAPI.
...
Guenther
(This used to be commit 0ef420c3a4
)
2008-07-01 10:02:01 +02:00
Günther Deschner
fc836440a5
net_vampire: keep keytab context and flush keytab only after the last query.
...
Guenther
(This used to be commit 48efe7dbce
)
2008-07-01 10:00:57 +02:00
Günther Deschner
16e44ee112
kerberos: allow to keep entries with old kvno's while creating keytab.
...
Guenther
(This used to be commit 6194244bd9
)
2008-06-30 12:38:40 +02:00
Günther Deschner
52635c6f58
kerberos: rename smb_krb5_kt_add_entry to smb_krb5_kt_add_entry_ext.
...
Guenther
(This used to be commit 48600a0019
)
2008-06-30 12:38:32 +02:00
Jeremy Allison
799252f635
Fix the non-LDAP, non-krb5 build, fix gcc -O3 warnings.
...
Jeremy.
(This used to be commit 9e2ab30d3c
)
2008-06-26 19:46:18 -07:00
Günther Deschner
46dd2d77ec
libnet_dssync: add last_query flag to processing routine.
...
Guenther
(This used to be commit 22bdee7fe0
)
2008-06-27 02:01:15 +02:00
Günther Deschner
e58b2db024
libnet_dssync: add output filename and dns_domain_name to dssync struct.
...
Guenther
(This used to be commit c16e1820f8
)
2008-06-27 02:01:03 +02:00
Günther Deschner
92df9ae393
net_vampire: use bool for last_query information in samsync.
...
Guenther
(This used to be commit fa1976e23a
)
2008-06-27 01:59:26 +02:00
Günther Deschner
8b52e2bc63
net_vampire: separate keytab code from samsync code.
...
Guenther
(This used to be commit 69d8442bf3
)
2008-06-27 01:58:39 +02:00
Günther Deschner
31f1ad4311
libnet_dssync: pass down drsuapi_DsReplicaOIDMapping_Ctr to callback.
...
Guenther
(This used to be commit cbff970fac
)
2008-06-26 18:36:35 +02:00
Günther Deschner
a8b8994c2d
libnet_dssync: always decrypt attributes before passing them to the processing routine.
...
Guenther
(This used to be commit 6eedd167e7
)
2008-06-26 18:35:54 +02:00
Günther Deschner
eb6903344c
net_vampire: add some error output to libnet_dssync.
...
Guenther
(This used to be commit 891d4cca0c
)
2008-06-26 10:24:14 +02:00
Günther Deschner
92bd665aea
rpc_client: let cli_get_session_key() return talloced session key.
...
Thanks, Volker, for pointing this out.
Guenther
(This used to be commit b47899195e
)
2008-06-25 09:51:31 +02:00
Günther Deschner
2341f3381d
net_vampire: add basic libnet_dssync() infrastructure.
...
Guenther
(This used to be commit 9486e532da
)
2008-06-24 23:50:31 +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
34e4167446
net_vampire: add username/password to samsync_context.
...
Guenther
(This used to be commit e884304206
)
2008-06-24 23:39:50 +02:00
Günther Deschner
18c9e75218
libads: use ads_connect_user_creds in some places.
...
Guenther
(This used to be commit ebf31203e7
)
2008-06-24 23:37:58 +02:00
Günther Deschner
48a680ecf2
net_vampire: more libnet_samsync restructuring.
...
Guenther
(This used to be commit 3bcda522f0
)
2008-06-23 23:38:53 +02:00
Günther Deschner
8725626ec8
net_vampire: prepend libnet_ to the public samsync functions.
...
Guenther
(This used to be commit f020c947cf
)
2008-06-23 23:38:52 +02:00
Günther Deschner
bd6fece98a
net_vampire: move out display routines to one file.
...
Guenther
(This used to be commit 64b48a07e7
)
2008-06-23 23:38:52 +02:00
Günther Deschner
de33b264d1
net_vampire: move out passdb routines to one file.
...
Guenther
(This used to be commit 74d431270d
)
2008-06-23 23:38:52 +02:00
Günther Deschner
6f4571bf69
net_vampire: fix included header.
...
Guenther
(This used to be commit 1dbe6ea860
)
2008-06-23 23:38:52 +02:00
Günther Deschner
ddf6e73b1f
net_vampire: move pull_netr_AcctLockStr() to libnet.
...
Guenther
(This used to be commit 8ec64a96e4
)
2008-06-23 23:38:52 +02:00
Günther Deschner
fefcb70f87
net_vampire: add error and result_message to samsync_context.
...
Guenther
(This used to be commit e0b1172004
)
2008-06-17 19:55:16 +02:00
Günther Deschner
49b269f50f
net_vampire: add domain_name to samsync_context.
...
Guenther
(This used to be commit 7e7f07ec59
)
2008-06-17 19:55:10 +02:00
Günther Deschner
45bce6e505
net_vampire: fix samsync_process_database().
...
Turns out the password hashes are not rid encrypted in the samsync reply.
Guenther
(This used to be commit 7d8d60bcba
)
2008-06-17 10:49:14 +02:00
Günther Deschner
0d0043697d
net_vampire: fix build warning.
...
Guenther
(This used to be commit eb4232fec0
)
2008-06-17 10:49:14 +02:00
Günther Deschner
16eb846fa5
net_vampire: use generic output filename and use correct argv element.
...
Guenther
(This used to be commit e0843e631e
)
2008-06-17 10:49:13 +02:00
Günther Deschner
51fec7863b
net_vampire: move ldif code out of net_rpc_samsync.c
...
Guenther
(This used to be commit 1d5758ec3a
)
2008-06-17 10:49:13 +02:00
Günther Deschner
ccdcbc2efe
net_vampire: move some samsync functions to libnet.
...
Guenther
(This used to be commit b3b6af0a3e
)
2008-06-17 10:49:13 +02:00
Günther Deschner
813ca8d705
samsync: add prototype for samsync_fix_delta_array().
...
Guenther
(This used to be commit 6c1904f8be
)
2008-06-13 12:30:36 +02:00
Günther Deschner
61b68fc43c
samsync: add samsync_fix_delta_array()
...
This code is vastly based on samba4 code.
Guenther
(cherry picked from commit 5b68be9699
)
(This used to be commit 2c53d87de4
)
2008-06-13 12:23:50 +02:00
Günther Deschner
e3e1172979
libnetjoin: add libnet_join_rollback().
...
This is required now if the join verify failed and we already
modified the local configuration.
Guenther
(This used to be commit 2870fe50af
)
2008-06-05 19:34:30 +02:00
Günther Deschner
387706a49d
libnetjoin: First store configuration and then verify the join.
...
Jerry, this fixes the issues while joining with "config backend = registry".
Guenther
(This used to be commit b3d47f0992
)
2008-06-05 19:34:06 +02:00
Günther Deschner
bb58d33b6d
libnetjoin: correctly copy returned lsa policy sid.
...
Guenther
(This used to be commit f9e5450c94
)
2008-06-04 18:05:15 +02:00
Günther Deschner
dddc5725db
libnetjoin: only close existing policy handles while unjoining.
...
Guenther
(This used to be commit 6dbed6e7b7
)
2008-06-04 02:43:41 +02:00
Günther Deschner
aa8bfd39eb
libnetjoin: delete possible "realm" leftover parameter.
...
Guenther
(This used to be commit d7ba98cc3f
)
2008-06-04 01:35:44 +02:00
Michael Adam
04da4453ab
libnet: freeze libnet_proto.h from "make proto"
...
Michael
(This used to be commit b455cd1a61
)
2008-05-18 23:35:42 +02:00
Günther Deschner
6b2af349cf
libnetjoin: for informational reasons, report forest_name.
...
Guenther
(This used to be commit 452a9ea4af
)
2008-05-16 12:16:04 +02:00
Günther Deschner
847d385f7b
Fix Bug #5465 (joining with createcomputer=ou1/ou2/ou3).
...
Guenther
(This used to be commit f3251ba03a
)
2008-05-14 23:53:23 +02:00
Günther Deschner
67c644aa59
dsgetdcname: use existing messaging_context if possible.
...
Guenther
(This used to be commit 7889516a38
)
2008-05-09 14:59:20 +02:00
Günther Deschner
f11acf3582
Use strip_hostname after dsgetdcname/getdcname calls.
...
Guenther
(This used to be commit 82cbb3269b
)
2008-05-09 14:59:19 +02:00
Günther Deschner
c27e661ad1
libnetjoin: identify type of domain early.
...
This finally enables joining AD using workgroup or realm name.
Guenther
(This used to be commit 0cf16e6b47
)
2008-04-22 01:54:49 +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
ae1e1085a1
libnetjoin/net: Fix lp_config_backend_is_registry() handling.
...
Thanks obnox, now we can net ads join and net ads leave with zero
configuration changes if "config backend = registry".
Guenther
(This used to be commit 9003881773
)
2008-04-14 23:07:55 +02:00
Günther Deschner
a31281a751
libnetjoin: delete the workgroup name when requested while unjoining.
...
Guenther
(This used to be commit 1782e89f33
)
2008-04-14 22:57:37 +02:00
Günther Deschner
c8d96d57f8
libnetjoin: separate out libnet_join_lookup_dc_rpc.
...
Guenther
(This used to be commit 8d3d1c094a
)
2008-04-14 22:56:12 +02:00
Günther Deschner
cbd07aa047
libnetjoin: Fix unjoining when no KRB5CCNAME is around.
...
Guenther
(This used to be commit 7fd237c545
)
2008-04-14 16:15:18 +02:00
Günther Deschner
a4e0f60c4e
libnetjoin: Remove machine account if we failed to set password.
...
Guenther
(This used to be commit db5e0ed186
)
2008-04-14 14:44:58 +02:00
Günther Deschner
e33b13e826
libnetjoin: Fix joining when no KRB5CCNAME is around.
...
Guenther
(This used to be commit 512e6ca0a9
)
2008-04-14 12:33:10 +02:00
Günther Deschner
99d3590455
Fix NETLOGON credential chain with Windows 2008 all over the place.
...
In order to avoid receiving NT_STATUS_DOWNGRADE_DETECTED from a w2k8
netr_ServerAuthenticate2 reply, we need to start with the AD netlogon negotiate
flags everywhere (not only when running in security=ads). Only for NT4 we need
to do a downgrade to the returned negotiate flags.
Tested with w2k8, w2ksp4, w2k3r2 and nt4sp6.
Guenther
(This used to be commit 0970369ca0
)
2008-04-02 11:12:47 +02:00
Günther Deschner
8b29c8f634
Support "net ads join" format while joining to a specific ou.
...
libnetjoin now supports Computers/Servers/Unix as well as
ou=Computers,ou=Servers,ou=Unix,dc=ber,dc=realm,dc=com.
Guenther
(This used to be commit c0be84c96d
)
2008-03-28 16:43:59 +01:00
Günther Deschner
14b6e9d46b
Add Support for DOMAIN\DCNAME syntax in libnetjoin.
...
This format is used by Windows to enforce joining to a specific DC.
Guenther
(This used to be commit cc654892c0
)
2008-03-28 14:15:20 +01:00
Michael Adam
6f7cfeddd6
libsmbconf: add a "path" variable to the conf context.
...
This is passed to the module init routines.
In case of the registry, this is the path of the
basekey in registry, that is to be used, defaulting
to KEY_SMBCONF (HKLM\software\samba\smbconf), when
NULL is given. This is the only case currently used.
In order to support other keys, registry initialization
for smbconf has to be changed to support different keys.
Michael
(This used to be commit 96434d9dc7
)
2008-03-21 18:19:24 +01:00
Volker Lendecke
c69c5c132a
Fix Coverity ID 547
...
Günther, please check. If r->in.ads==NULL, we can't call ads_leave_realm at
all.
Thanks,
Volker
(This used to be commit 120d8c889f
)
2008-03-21 10:40:40 +01:00
Michael Adam
fececde181
libsmbconf: add backend specific init function.
...
Hide generic init function taking smbconf_ops argument
from public api.
Michael
(This used to be commit b3f6920ccb
)
2008-03-21 02:25:56 +01:00
Michael Adam
23b1d721b8
libsmbconf: rename smbconf_close() to smbconf_shutdown().
...
Michael
(This used to be commit 797b26ad3f
)
2008-03-21 02:25:56 +01:00
Michael Adam
adf5bf554c
libsmbconf: rename smbconf_open() to smbconf_init().
...
That's more appropriate.
Michael
(This used to be commit d7bd9bb8aa
)
2008-03-21 02:25:56 +01:00
Michael Adam
6274929b1e
libsmbconf: rename all occurrences of libnet_conf_ to smbconf_ .
...
Michael
(This used to be commit 097af0309d
)
2008-03-17 18:03:02 +01:00
Michael Adam
670418c116
Move libnet_conf to a library lib/smbconf/ of its own, fixing the api.
...
The libnet_conf code to access the registry based configuration has
become more of a library used in several places in samba (e.g. loadparm)
than an abstraction of "net conf". So I move it to a location lib/smbconf/.
In the same breath, the api is fixed (not generated by make proto anymore).
Michael
(This used to be commit 5315ef41f4
)
2008-03-17 18:03:02 +01:00
Günther Deschner
d06274b541
Add secure_channel_type to libnetjoin.
...
Guenther
(This used to be commit f88910c1e5
)
2008-03-04 19:04:54 +01:00
Günther Deschner
5a4182012d
Use TALLOC_FREE in libnetjoin debugging dump code.
...
Guenther
(This used to be commit b753087ff7
)
2008-03-04 11:07:13 +01:00
Günther Deschner
422af9a516
Make sure we are still able to join Windows 2008.
...
Guenther
(This used to be commit aa9c0f5877
)
2008-03-01 16:14:39 +01:00
Günther Deschner
53d55794df
libnetjoin: add fallback to level 24 samr setinfo so that libnet can join NT4.
...
Guenther
(This used to be commit bc2d3d5144
)
2008-02-29 01:27:52 +01:00
Günther Deschner
29222fa551
libnetjoin: Trying to avoid confusion between acct_flags, acb_info and
...
access_desired.
Guenther
(This used to be commit 63894e5c93
)
2008-02-29 01:25:45 +01:00
Günther Deschner
2306574570
libnetjoin: Merge in comments, debugs and missing code from original join code.
...
Guenther
(This used to be commit 09e6010159
)
2008-02-28 19:49:07 +01:00
Günther Deschner
15f6e27bd5
Add some more error handling in libnetjoin.
...
Guenther
(This used to be commit 892b2bc0cf
)
2008-02-28 17:05:38 +01:00
Günther Deschner
0d8985f2da
Let dsgetdcname() return a struct netr_DsRGetDCNameInfo.
...
Guenther
(This used to be commit b1a4b21f8c
)
2008-02-28 12:40:55 +01:00
Günther Deschner
7347e1ff47
Store domain_is_ad info as early as possible in libnetjoin.
...
Guenther
(This used to be commit c4ba68aa94
)
2008-02-28 11:38:01 +01:00
Günther Deschner
46bdaa5d37
Check for mandatory domain name in libnetjoin/unjoin.
...
Guenther
(This used to be commit 95bdf2f23c
)
2008-02-28 11:38:01 +01:00
Günther Deschner
4ba6c04d0a
Delete affinity cache entries while unjoining with libnetunjoin.
...
Guenther
(This used to be commit 0315b8e53d
)
2008-02-28 11:38:01 +01:00
Günther Deschner
09886976f6
Fill in machine account manipulation flags while unjoining in libnetunjoin.
...
Guenther
(This used to be commit 23ae67158e
)
2008-02-28 11:38:01 +01:00
Günther Deschner
1d807c3c29
Add preliminary libnet_join_post_verify call to libnetjoin.
...
Guenther
(This used to be commit f0e319a18d
)
2008-02-28 11:38:01 +01:00
Günther Deschner
39ba91fd83
Merge all connect ads calls into libnet_join_post_processing_ads().
...
Guenther
(This used to be commit be96baeffc
)
2008-02-28 11:38:01 +01:00
Günther Deschner
97c2dfc52f
Use W_ERROR_NOT_OK_GOTO_DONE macro in libnetjoin.
...
Guenther
(This used to be commit fec230b28f
)
2008-02-28 11:38:01 +01:00
Michael Adam
3e3df1bfe2
Add a function libnet_conf_get_seqnum() to the libnet_conf API.
...
This is to provide a change sequence number to users, so that they
can use it to detect change in the config and trigger a reload.
Michael
(This used to be commit a0b12f4d81
)
2008-02-19 09:09:04 +01:00
Michael Adam
9af84dd382
Rename registry_init_regdb() to registry_init_smbconf().
...
That's what it actually is.
Michael
(This used to be commit 9d3c27f557
)
2008-02-15 16:23:10 +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
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
b1c6104fa4
Use every
...
(This used to be commit d9cec295bf
)
2008-02-12 18:21:52 +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
210a4ab76f
Use rpccli_samr_LookupNames() in libnetjoin.
...
Guenther
(This used to be commit e62bfd2dee
)
2008-02-08 15:30:35 +01:00
Günther Deschner
adeb94a9a6
Use rpccli_lsa_QueryInfoPolicy() in libnet_join.
...
Guenther
(This used to be commit 28ef55cbf1
)
2008-02-08 10:26:51 +01:00
Günther Deschner
3783e6af8a
Use rpccli_lsa_QueryInfoPolicy2 in libnet join.
...
Guenther
(This used to be commit ddc2fc16bf
)
2008-02-08 10:16:00 +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
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
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
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
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
5ab43ae0d8
Eliminate remote tree of dsgetdcname (which will happen in libnetapi then).
...
Guenther
(This used to be commit fd490d236b
)
2008-01-29 15:09:56 +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
Michael Adam
feb77c978b
Add another check for talloc failure to libnet_conf
...
Michael
(This used to be commit 196e4ce8c5
)
2008-01-21 22:49:45 +01:00
Michael Adam
c5c38d6227
Fix formatting of multi_sz registry values.
...
Don't print only the last component.
Michael
(This used to be commit 654e96208e
)
2008-01-21 22:49:45 +01:00
Michael Adam
7f2e253efb
Use talloc_stackframe() for temporary contexts throughout libnet_conf.c
...
Michael
(This used to be commit 4d734106b7
)
2008-01-21 22:49:45 +01:00
Michael Adam
188bfbc192
Add a check for talloc failure. - Pointed out by Volker.
...
Michael
(This used to be commit bdc49b07cc
)
2008-01-21 22:49:45 +01:00
Michael Adam
7bfceba4bc
Use lp_config_backend_is_registry() instead of lp_include_registry_globals().
...
Michael
(This used to be commit c5a7d421c5
)
2008-01-16 17:10:02 +01:00
Günther Deschner
168e122682
Autofetch domain_sid while unjoining in libnetjoin.
...
Guenther
(This used to be commit 622109895c
)
2008-01-16 11:08:05 +01:00
Günther Deschner
1311918d17
Nicen some error strings in libnetjoin.
...
Guenther
(This used to be commit 05cf1413cc
)
2008-01-16 11:08:05 +01:00
Günther Deschner
1bb220174f
Avoid use of NDR_PRINT_X_DEBUG (that debugs with level 0) in libnetjoin.
...
Guenther
(This used to be commit 357a393b10
)
2008-01-16 11:08:05 +01:00
Günther Deschner
fe165e4a9f
Use autogenerated debugging functions in libnetjoin when requested.
...
Guenther
(This used to be commit 08c1720509
)
2008-01-15 17:00:58 +01:00
Günther Deschner
40222cc8e2
Remove unrequired TALLOC_FREE.
...
Guenther
(This used to be commit 15d0e57438
)
2008-01-15 15:48:48 +01:00
Günther Deschner
b239612fcf
Use autogenerated libnet_join header.
...
Guenther
(This used to be commit d94bd3a03b
)
2008-01-15 15:29:50 +01:00
Günther Deschner
b32d613ed0
No need to re-establish AD connection all the time.
...
Guenther
(This used to be commit f21871c6d6
)
2008-01-15 11:02:56 +01:00
Günther Deschner
f41cd6c8e4
Use dsgetdcname() to find a dc when unjoining in libnetjoin.
...
Guenther
(This used to be commit 1a5b72daa3
)
2008-01-15 11:02:56 +01:00
Günther Deschner
0e8240f5a5
Re-arrange pre- and postprocessing code in libnetjoin.
...
Guenther
(This used to be commit 99e3e4b0dd
)
2008-01-15 11:02:56 +01:00
Michael Adam
3910dd2e1b
Make use of the new libnet_conf_delete_global_parameter() function.
...
Michael
(This used to be commit aed01fd28c
)
2008-01-13 23:20:51 +01:00
Michael Adam
864fc10a27
Add a function libnet_conf_delete_global_parameter() to libnet_conf.c
...
Create the [global] section if it does not yet exist.
Michael
(This used to be commit 90fa2981c9
)
2008-01-13 23:16:42 +01:00
Michael Adam
c4899fec9f
Add a function libnet_conf_get_global_parameter() to libnet_conf.c
...
It creates the [global] section if it does not yet exist.
Michael
(This used to be commit 627a29b690
)
2008-01-13 23:16:42 +01:00
Michael Adam
d042a64092
Move libnet_conf_set_global_parameter() inside libnet_conf.c
...
Also remove the "convenience function" section comment.
The set_global_parameter function now has a right to exist
in the api.
Michael
(This used to be commit fd99c1804a
)
2008-01-13 23:16:41 +01:00
Michael Adam
ecc53ab371
Add a comment header to libnet_conf_set_global_parameter().
...
Michael
(This used to be commit c050b148d0
)
2008-01-13 23:16:41 +01:00
Michael Adam
8fc2db5070
Add auto-adding of [global] to libnet_conf_set_global_parameter().
...
Michael
(This used to be commit ad2497cfac
)
2008-01-13 23:16:41 +01:00
Michael Adam
89fb79ada6
Remove auto-generation of missing share from libnet_conf_set_parameter().
...
Günther, I wanted to have this as atomic as possible.
I will add this behaviour to libnet_conf_set_global_parameter() next
with the justification that [global] should exist transparently.
Michael
(This used to be commit e2b34e9c02
)
2008-01-13 23:16:41 +01:00
Michael Adam
1ee6d3e1ee
Introduce a libnet_conf context created by libnet_conf_open().
...
The libnet_conf_ctx stores the information necessary to interoperate
with the configuration. It is created by calling libnet_conf_open()
and destroyed by calling libnet_conf_close(). The context is passed
to all the libnet_conf functions. It currently stores the token to
access the registry. Later, it could store more data, e.g. the server
to connect to, credentials, and so on. For support of other backends
than registry or support of remote configuration, only the open
function will have to be changed.
In net_conf, the calls to the actual net_conf functions is wrapped
into a function that calls libnet_conf_open()/_close(). Thus an
individual variant of net_conf_runfunction2() and functable2 is
used to cope with functions being called by the wrapper with the
additional libnet_conf_ctx argument.
Michael
(This used to be commit c2a9346faa
)
2008-01-13 02:14:34 +01:00
Günther Deschner
45db92cc72
Fix some indents.
...
Guenther
(This used to be commit 57368f883f
)
2008-01-12 02:26:08 +01:00
Günther Deschner
afb163efb7
Call dsgetdcname when we have no specific dc defined for joining.
...
Guenther
(This used to be commit 40e8caa2d8
)
2008-01-12 02:25:57 +01:00
Günther Deschner
d4e5cadc1a
Fix some error strings in libnet_join.
...
Guenther
(This used to be commit 8af80976a3
)
2008-01-12 02:25:47 +01:00
Günther Deschner
21ccb47044
Add appropriate error code when pre-creating accounts in ous isnt supported by DC.
...
Guenther
(This used to be commit 4a7acf4a23
)
2008-01-12 02:25:37 +01:00
Günther Deschner
bc629c6faf
For libnet_join error string functions, make sure not to overwrite last status string.
...
Guenther
(This used to be commit a9b76c9e2d
)
2008-01-12 02:25:25 +01:00
Günther Deschner
e69c82eb44
Merge all ads related calls in libnet_join_post_processing_ads().
...
Guenther
(This used to be commit b76250f1cf
)
2008-01-12 02:25:15 +01:00
Günther Deschner
a05edb57e7
Use WITH_ADS define in libnet_join, hopefully not breaking the build.
...
Guenther
(This used to be commit 48f638a455
)
2008-01-12 02:10:17 +01:00
Günther Deschner
8921b2222a
Auto-add missing shares in libnet_conf_set_parameter().
...
Michael, please have a look.
Guenther
(This used to be commit 9f4506e5e2
)
2008-01-12 01:36:04 +01:00
Günther Deschner
9d164c4094
Add debug bool flag for libnetjoin ctx.
...
Guenther
(This used to be commit 9308448795
)
2008-01-12 01:35:57 +01:00
Günther Deschner
fbd6d14fc8
Use domain_is_ad one more time in libnetjoin.
...
Guenther
(This used to be commit 82bd6322b6
)
2008-01-12 01:35:51 +01:00
Michael Adam
9cd7430347
Remove code accidentially submittet with last commit 83aed537c1
.
...
This is ist still in preparation and will follow soon. Soory!
Michael
(This used to be commit 75acdb54a4
)
2008-01-11 19:02:26 +01:00
Michael Adam
618f9a60cc
Fix panic in "net conf": Fix logic in error condition.
...
Michael
(This used to be commit 83aed537c1
)
2008-01-11 18:55:26 +01:00
Günther Deschner
026b2a8d0a
Remove '\n' from error strings in libnet_join context.
...
Guenther
(This used to be commit 9cc0d874f6
)
2008-01-11 15:10:29 +01:00
Günther Deschner
55b642c312
Set error string when ads_leave_realm() has failed in libnetjoin.
...
Guenther
(This used to be commit 01690f85bc
)
2008-01-11 15:10:21 +01:00
Günther Deschner
2bcba87572
Ignore result of libnet_conf_delete_parameter here, as realm may be not there.
...
Guenther
(This used to be commit 2e2d058b7e
)
2008-01-11 15:09:20 +01:00
Günther Deschner
2c591e05c9
Remove some more references to global_myname() in libnet_join.
...
Guenther
(This used to be commit ed4960bacc
)
2008-01-11 15:09:01 +01:00
Günther Deschner
136b02de5e
Use domain_is_ad bool.
...
Guenther
(This used to be commit 9707a5eb00
)
2008-01-11 15:08:52 +01:00
Günther Deschner
28b852a893
Add domain_is_ad bool to libnetjoin ctx.
...
Guenther
(This used to be commit 16ca8d2746
)
2008-01-11 15:08:41 +01:00
Michael Adam
1c4466cedc
Try to fix the build on hosts that HAVE_LDAP but don't HAVE_KRB5.
...
Michael
(This used to be commit 829de79051
)
2008-01-09 23:15:56 +01:00
Günther Deschner
fbd9a15996
Another attempt to fix builds w/o ldap and/or krb5.
...
Guenther
(This used to be commit e73e3da772
)
2008-01-09 12:48:08 +01:00
Günther Deschner
ba922343db
Add libnet_join_derive_salting_principal().
...
Guenther
(This used to be commit 95129a28cf
)
2008-01-09 10:20:44 +01:00
Michael Adam
22068a0c16
Change registry_create_admin_token() to return NTSTATUS.
...
Michael
(This used to be commit 9cd30fb25c
)
2008-01-09 01:47:10 +01:00
Günther Deschner
697208406c
Fix define check s/WITH_LDAP/HAVE_LDAP/ in libnet_join.
...
Guenther
(This used to be commit 045a69c59c
)
2008-01-08 14:07:09 +01:00
Günther Deschner
c6576503c9
When unjoining fails (e.g. missing creds) make sure we still correct config.
...
Guenther
(This used to be commit 7f51583f68
)
2008-01-08 11:59:01 +01:00
Günther Deschner
c8abd25d94
Trying to make the buildfarm w/o krb5 happy.
...
Guenther
(This used to be commit 079f2eba81
)
2008-01-07 20:56:34 +01:00
Günther Deschner
d5dec33904
There is no LDAP in some corners of this world. Fix the build...
...
Guenther
(This used to be commit 83ed37023c
)
2008-01-07 20:41:55 +01:00
Günther Deschner
ec75d53dfc
Finally use libnet_join_set_* functions in libnetjoin.
...
Guenther
(This used to be commit 1436670854
)
2008-01-07 20:21:02 +01:00
Günther Deschner
60eb92478c
Merge remaining post-AD-join functions from net into libnet_join.
...
Guenther
(This used to be commit 3e816d7555
)
2008-01-07 20:17:47 +01:00
Günther Deschner
d66118629c
Add libnet_join_find_machine_acct().
...
Guenther
(This used to be commit f550ed02ff
)
2008-01-07 19:39:35 +01:00
Günther Deschner
5b5f17a81d
Honor the WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE flag when unjoining from AD.
...
Guenther
(This used to be commit ed164b523e
)
2008-01-07 19:39:21 +01:00
Günther Deschner
0bbc04d516
Rearrange libnet join code and add support for account pre-creation in AD.
...
Guenther
(This used to be commit 18ae858042
)
2008-01-07 19:39:11 +01:00
Günther Deschner
60555e66dd
Add ADS_STRUCTs to libnetjoin and -unjoin, with talloc destructors.
...
Guenther
(This used to be commit 985d452069
)
2008-01-07 19:38:59 +01:00
Günther Deschner
077eaafed5
Add error_string to libnetjoin and libnetunjoin structures incl. set functions.
...
Guenther
(This used to be commit 4f9985bb33
)
2008-01-07 19:38:48 +01:00
Günther Deschner
6345220151
Only create machine account in libnetjoin when requested to.
...
Guenther
(This used to be commit bc025a3860
)
2008-01-07 12:48:21 +01:00
Günther Deschner
28ef4878d9
Rename server_name to dc_name in libnet join structures.
...
Guenther
(This used to be commit ff5e15b1ba
)
2008-01-04 17:43:15 +01:00
Günther Deschner
6f84ea9cd7
Separate out storing and removing secrets in libnet_join/unjoin.
...
Guenther
(This used to be commit b59ca2d9c3
)
2008-01-04 17:43:09 +01:00
Günther Deschner
0399df22f0
In libnet_join finally separate the admin from the machine pwd entirely.
...
Guenther
(This used to be commit d88bb94f0e
)
2008-01-04 17:43:02 +01:00
Günther Deschner
8dc1bf89a7
Robustness fix for libnet join when unjoining.
...
Guenther
(This used to be commit d7f01d940f
)
2008-01-04 11:55:00 +01:00
Günther Deschner
192700bd08
Use different error code for libnet_conf initialization failure.
...
Guenther
(This used to be commit 65537eae84
)
2008-01-03 18:15:28 +01:00
Michael Adam
5470f8f638
Make libnet_conf handle opening/initialization of the registry.
...
Open state is currently tracked by a global variable
to avoid double initialization.
Later, this can possibly be replaced by a conf-context
created by an initialization function and passed around
to the other api functions.
Michael
(This used to be commit 77713e7764
)
2008-01-03 15:33:09 +01:00
Michael Adam
6dce6ba0a6
Add a comment header and do some slight reformatting.
...
Michael
(This used to be commit 5d557e3f95
)
2008-01-03 14:34:31 +01:00
Michael Adam
30829d1bda
Use GLOBAL_NAME constant.
...
Michael
(This used to be commit 4c404d627c
)
2008-01-03 14:17:49 +01:00
Michael Adam
5655ae7a24
Rename libnet_smbconf_set_global_param() to libnet_conf_set_global_parameter().
...
Now all functions are converted to the consistent naming scheme.
Michael
(This used to be commit a559533c0c
)
2008-01-03 14:17:49 +01:00
Michael Adam
2476254ccd
Rename libnet_smbconf_delparm() to libnet_conf_delete_parameter().
...
Michael
(This used to be commit 073eeca51e
)
2008-01-03 14:17:49 +01:00
Michael Adam
55771b356d
Rename libnet_smbconf_getparm() to libnet_conf_get_parameter().
...
Michael
(This used to be commit d08556dbc7
)
2008-01-03 14:17:49 +01:00
Michael Adam
b9f904b59d
Rename libnet_smbconf_setparm() to libnet_conf_set_parameter().
...
Michael
(This used to be commit e00cb415d3
)
2008-01-03 14:17:49 +01:00
Michael Adam
e89411effd
Rename libnet_smbconf_delshare() to libnet_conf_delete_share().
...
Michael
(This used to be commit 2075baf551
)
2008-01-03 14:17:49 +01:00
Michael Adam
e1aa474a32
Rename libnet_smbconf_getshare() to libnet_conf_get_share().
...
Michael
(This used to be commit 1575612f19
)
2008-01-03 14:17:49 +01:00
Michael Adam
3f3a29ed50
Rename libnet_smbconf_create_share() to libnet_conf_create_share().
...
Michael
(This used to be commit 6bc4ee2108
)
2008-01-03 14:17:49 +01:00
Michael Adam
630de5f555
Rename libnet_smbconf_share_exists() to libnet_conf_share_exists().
...
Michael
(This used to be commit 3258758e5c
)
2008-01-03 14:17:49 +01:00
Michael Adam
daf1a460c8
Rename libnet_smbconf_get_share_names() to libnet_conf_get_share_names().
...
Michael
(This used to be commit 2e4beee66b
)
2008-01-03 14:17:49 +01:00
Michael Adam
90837d048b
Rename libnet_smbconf_get_config() to libnet_conf_get_config().
...
Michael
(This used to be commit e8f7c07699
)
2008-01-03 14:17:49 +01:00
Michael Adam
05ff62cf78
Rename libnet_smbconf_drop() to libnet_conf_drop().
...
Michael
(This used to be commit 42ae33a962
)
2008-01-03 14:17:49 +01:00
Michael Adam
12a0cd5310
Rename libnet_smbconf_reg_get_values() to libnet_conf_reg_get_values().
...
Now all internal helper functions are converted to the consistent
naming scheme.
Michael
(This used to be commit c23e6636a8
)
2008-01-03 14:17:49 +01:00
Michael Adam
6ab11e5f98
Rename libnet_smbconf_format_registry_value() to libnet_conf_format_registry_value().
...
Michael
(This used to be commit 3f9f353351
)
2008-01-03 14:17:49 +01:00
Michael Adam
547c3583e4
Rename libnet_smbconf_reg_set_value() to libnet_conf_reg_set_value().
...
Michael
(This used to be commit 96b2923bc3
)
2008-01-03 14:17:48 +01:00
Michael Adam
340cb434db
Rename libnet_smbconf_reg_create_service_key() to libnet_conf_reg_create_service_key().
...
Michael
(This used to be commit cd1846943c
)
2008-01-03 14:17:48 +01:00
Michael Adam
d3e54d913c
Rename libnet_smbconf_value_exists() to libnet_conf_value_exists().
...
Michael
(This used to be commit 49f740797b
)
2008-01-03 14:17:48 +01:00
Michael Adam
cd84256866
Rename libnet_smbconf_reg_open_basekey() to libnet_conf_reg_open_base_key().
...
Michael
(This used to be commit c2ba52b2c3
)
2008-01-03 14:17:48 +01:00
Michael Adam
dde8701b85
Rename libnet_smbconf_reg_open_service_key() to libnet_conf_reg_open_service_key().
...
Michael
(This used to be commit 4d86d2dd6f
)
2008-01-03 14:17:48 +01:00
Michael Adam
e598b93d2f
Rename libnet_smbconf_reg_open_path() to libnet_conf_reg_open_path().
...
Michael
(This used to be commit 9868364e2c
)
2008-01-03 14:17:48 +01:00
Michael Adam
4612391850
Rename libnet_smbconf_add_string_to_array() to libnet_conf_add_string_to_array().
...
This is the start of making nomenclature more consistent
(functions in libnet_conf.c should be called libnet_conf_*,
not libnet_smbconf_* ...
Michael
(This used to be commit 0dd3967bfd
)
2008-01-03 14:17:48 +01:00
Günther Deschner
b0994bead7
In libnetjoin don't mix admin password with machine account pwd.
...
Guenther
(This used to be commit 5b2eec21c2
)
2008-01-03 13:17:49 +01:00
Michael Adam
984aa7a156
Rename libnet_smbconf_reg_setvalue_internal() to libnet_smbconf_reg_set_value().
...
Michael
(This used to be commit 3fc3fee88a
)
2008-01-03 11:35:21 +01:00
Michael Adam
e0ea759807
Fix a comment.
...
Michael
(This used to be commit 2d0c7fe44f
)
2008-01-03 11:33:17 +01:00
Michael Adam
a750e223b3
Rename libnet_smbconf_reg_createkey_internal to libnet_smbconf_reg_create_service_key.
...
Michael
(This used to be commit 08056a2c81
)
2008-01-03 11:32:00 +01:00
Michael Adam
fd597c7e6d
Add libnet_conf API function libnet_smbconf_create_share().
...
And make libnet_smbconf_setparm() return error if the share
does not already exist. Adapt net_conf_addshare to this new
situation.
Michael
(This used to be commit de349bd26d
)
2008-01-03 11:30:14 +01:00
Günther Deschner
40079c4eb4
Remove unused vars.
...
Guenther
(This used to be commit ff3f0006d1
)
2008-01-03 10:49:39 +01:00
Michael Adam
ad1cc905b2
Don't leak: Use a temporary context for the admin token and free it.
...
Michael
(This used to be commit 9d7502115e
)
2008-01-03 01:29:43 +01:00
Michael Adam
3c9f7c7a64
Use libnet_smbconf_reg_open_path() in libnet_smbconf_drop().
...
Replaces creation of token and direct use of reg_open_path.
Michael
(This used to be commit 7e407e18be
)
2008-01-03 01:29:43 +01:00
Michael Adam
3bf57a4d82
Abstract opening of registry path out of libnet_smbconf_reg_open_service_key().
...
Creates new function libnet_smbconf_reg_open_path().
Use libnet_smbconf_reg_open_path() directly in libnet_smbconf_reg_open_basekey().
Return error in libnet_smbconf_reg_open_service_key() when NULL
servicename is given.
Michael
(This used to be commit 1e46b47963
)
2008-01-03 01:29:43 +01:00
Michael Adam
f9bb8a345e
Add debug output in error path.
...
Michael
(This used to be commit a58ccbc6d7
)
2008-01-03 01:29:43 +01:00
Michael Adam
b344dafa62
Fix setting of error code in error path.
...
Michael
(This used to be commit 8a7954a9ae
)
2008-01-03 01:29:43 +01:00
Michael Adam
a6fb71e55b
Use a better parameter name.
...
Michael
(This used to be commit 3972deb90c
)
2008-01-03 01:29:43 +01:00
Michael Adam
c995a63371
Rename libnet_smbconf_reg_open_path() to libnet_smbconf_reg_open_service_key().
...
Michael
(This used to be commit d95b4935d3
)
2008-01-03 01:29:43 +01:00
Michael Adam
d191bb126b
Hey, it is 2008 now.
...
:-)
Michael
(This used to be commit a1d3f60ea7
)
2008-01-03 01:29:43 +01:00
Michael Adam
102fda5c29
Choose a more apropriate parameter name.
...
Michael
(This used to be commit 39a73b6291
)
2008-01-03 01:29:43 +01:00
Michael Adam
83d74c10a2
Rename libnet_smbconf_reg_open_basepath() to libnet_smbconf_reg_open_basekey().
...
Michael
(This used to be commit 9e953a94e9
)
2008-01-03 01:29:43 +01:00
Michael Adam
8598bbbcb1
Make the last two helper functions in libnet_conf.c static.
...
Now the registry backend is completely hidden from the API.
Michael
(This used to be commit 5608c398ad
)
2007-12-31 03:57:45 +01:00
Michael Adam
e8a680cdf3
Rename libnet_smbconf_key_exists() to libnet_smbconf_share_exists()
...
and move it to the api section of libnet_conf.c
Michael
(This used to be commit 9b5d8f4d95
)
2007-12-31 01:14:44 +01:00
Michael Adam
0f2e7c7381
Remove an unused variable.
...
Michael
(This used to be commit 7bac935b65
)
2007-12-30 22:36:01 +01:00
Michael Adam
80957726b6
Remove all d_fprintf-s from libnet_conf.c
...
Replacing them buy DEBUG statements and filling in
d_fprintfs in callers in net_conf.c.
Michael
(This used to be commit 1f0122d8d4
)
2007-12-30 22:36:01 +01:00
Michael Adam
d674b95357
Make libnet_smbconf_reg_open_path() static.
...
Michael
(This used to be commit 6447bae71c
)
2007-12-30 00:32:42 +01:00
Michael Adam
1f992517ec
Make libnet_smbconf_reg_open_basepath() static.
...
Michael
(This used to be commit 8e87dd79ba
)
2007-12-30 00:32:42 +01:00
Michael Adam
59128c7837
Remove list_values() from net_conf.c - it is not needed any more.
...
Also make libnet.c:libnet_smbconf_format_registry_value() static.
(There are nor more external callers.)
Michael
(This used to be commit ac7baa17e8
)
2007-12-30 00:32:41 +01:00
Michael Adam
fe47e2e855
Add a function libnet_smbconf_get_config() to libnet_conf.c
...
This gets the whole config as a set of lists (of share names
and corresponding lists of parameter names and values). The function
is an aggregate of libnet_smbconf_get_share_names() and
libnet_smbconf_getshare().
Michael
(This used to be commit 94e97a7254
)
2007-12-30 00:32:41 +01:00
Michael Adam
df93c1aa57
Include libnet/libnet.h in libnet_conf.c to have prototypes available.
...
Michael
(This used to be commit 4842438c39
)
2007-12-30 00:32:41 +01:00
Michael Adam
397b4d5397
Return NULL (instead of unchanged) for no shares/parameters defined.
...
Michael
(This used to be commit bfe3d1462f
)
2007-12-29 17:06:49 +01:00
Michael Adam
a6d6fbb73d
Dont return count - 1 but count from libnet_smbconf_reg_get_values().
...
Michael
(This used to be commit ded60dec7d
)
2007-12-29 17:02:27 +01:00
Michael Adam
e8cb7cecf2
Make sure libnet_smbconf_get_share_names() always lists "global" first.
...
And don't return count-1 but count.
Michael
(This used to be commit b7cb9b7823
)
2007-12-29 17:00:27 +01:00
Michael Adam
0e8ca78720
Move talloc-appending a string to an array to its own helper function
...
libnet_smbconf_add_string_to_array().
Michael
(This used to be commit f4a4c1b26a
)
2007-12-29 16:45:01 +01:00
Volker Lendecke
d38aa8d037
Fix uninitalized variables
...
(This used to be commit 2322fe7187
)
2007-12-29 16:41:31 +01:00
Michael Adam
1c03f6b608
Rename libnet_smbconf_getshares() to libnet_smbconf_get_share_names().
...
Michael
(This used to be commit 9b3b9aa7e1
)
2007-12-29 12:55:42 +01:00
Michael Adam
cf90b67d59
Add a comment header for libnet_smbconf_getshares().
...
Michael
(This used to be commit 7b51535f2f
)
2007-12-29 12:53:19 +01:00
Michael Adam
2a642a6e2b
Move functionality of net_conf_listshares() to libnet_conf.c
...
into new function libnet_smbconf_getshares().
Michael
(This used to be commit 306c7e4d9c
)
2007-12-29 12:52:09 +01:00
Michael Adam
f8c39cbb7b
Move functionality of net_conf_showshare() to libnet_conf.c
...
The functionality is moved to a new function libnet_smbconf_getshare().
This returns the parameters of the given share as two lists: the list
of parameter names and the list of matching (formatted) parameter values.
The retrieval and formatting is done in a new internal helper function
libnet_smbconf_reg_get_values() that is to become the replacement for
list_values() from net_conf.c once functionality of net_conf_list() has
been moved to libnet_conf, too.
Michael
(This used to be commit 198232bd52
)
2007-12-29 12:32:16 +01:00
Michael Adam
27f0130434
Add a couple of comment headers to the main libnet_conf functions.
...
Michael
(This used to be commit e9694ae20e
)
2007-12-29 02:26:33 +01:00
Michael Adam
b5b51b530f
Add a comment header for libnet_smbconf_format_registry_value().
...
Michael
(This used to be commit 80e73407ea
)
2007-12-29 02:18:44 +01:00
Michael Adam
618b0efbbc
Handle NULL talloc context in libnet_smbconf_format_registry_value().
...
Maybe we should generate a new context instead of returning NULL?
Michael
(This used to be commit d7aaec713e
)
2007-12-29 02:16:38 +01:00
Michael Adam
eb356fbafc
Hide the registry backend from libnet_smbconf_getparm().
...
Return a formatted string of the value instead.
Michael
(This used to be commit 7d0ec5bae1
)
2007-12-29 02:12:33 +01:00
Michael Adam
4b75bc63bb
Rename format_value() to libnet_smbconf_format_registry_value().
...
Michael
(This used to be commit 95d5dd9bb0
)
2007-12-29 01:17:39 +01:00
Michael Adam
dfa8d9356c
Move format_value() to libnet_conf.c.
...
Michael
(This used to be commit 3422a5048a
)
2007-12-29 00:05:58 +01:00
Michael Adam
f99af84e6a
Move libnet_smbconf_reg_open_basepath() in source file
...
to group helper functions more logically.
Michael
(This used to be commit 3fa3891f87
)
2007-12-26 01:03:28 +01:00
Michael Adam
afca308742
Rename libnet_smbconf_open_basepath() to libnet_smbconf_reg_open_basepath().
...
Michael
(This used to be commit 4c0e7270c4
)
2007-12-26 01:01:14 +01:00
Michael Adam
18ea20e19b
Rename libnet_smbconf_open_path() to libnet_smbconf_reg_open_path().
...
Michael
(This used to be commit 4b0e636965
)
2007-12-26 00:58:11 +01:00
Michael Adam
e8cfbb0f4c
Rename libnet_smbconf_open_path_q() to libnet_smbconf_open_path()
...
removing previouse libnet_smbconf_open_path() and adding
DEBUG output (instead of d_fprintf error output) to new
libnet_smbconf_open_path().
Michael
(This used to be commit e63cc54fab
)
2007-12-26 00:53:19 +01:00
Michael Adam
a107e8421d
Remove now unneeded talloc ctx parameter from do_JoinConfig().
...
Michael
(This used to be commit be985d8d0c
)
2007-12-25 03:41:34 +01:00
Michael Adam
8445e820f2
Remove now unneeded talloc ctx parameter from do_join_modify_vals_config().
...
Michael
(This used to be commit f8823ae123
)
2007-12-25 03:40:35 +01:00
Michael Adam
d25661a615
Remove now unneeded talloc ctx parameter from do_UnjoinConfig().
...
Michael
(This used to be commit 92b8e5ea4b
)
2007-12-25 03:39:31 +01:00
Michael Adam
fc8be9d710
Remove now unneeded talloc ctx parameter from do_unjoin_modify_vals_config().
...
Michael
(This used to be commit 4f7375a110
)
2007-12-25 03:38:06 +01:00
Michael Adam
44631bfd4d
Remove talloc context parameter from libnet_smbconf_delparm().
...
Make use of talloc stackframe internally.
This removes talloc contxt from net_conf_delparm.
Michael
(This used to be commit 16f1373938
)
2007-12-25 03:34:04 +01:00
Michael Adam
f3b0469b4a
Remove talloc context parameter from libnet_smbconf_setparm().
...
Make use of talloc stackframe internally.
This removes talloc contxt from net_conf_setparm.
Michael
(This used to be commit efaffefc43
)
2007-12-25 03:29:05 +01:00
Michael Adam
a66a5fd94b
Typofix in comment.
...
Michael
(This used to be commit 5039a70246
)
2007-12-25 03:16:25 +01:00
Michael Adam
dff8e6b62c
Add comment header to function libnet_smbconf_drop().
...
Michael
(This used to be commit e94edb6bdb
)
2007-12-25 03:08:00 +01:00
Michael Adam
efd218fb07
Remove a d_fprintf() from libnet_smbconf_drop().
...
Michael
(This used to be commit 078e5e98b3
)
2007-12-25 03:06:48 +01:00
Michael Adam
e5a87c2543
Remove talloc context parameter from libnet_smbconf_drop().
...
Make use of talloc_stackframe.
Michael
(This used to be commit aaceab1153
)
2007-12-25 03:05:06 +01:00
Michael Adam
2764f5a0a6
Rename drop_smbconf_internal() to libnet_smbconf_drop().
...
Michael
(This used to be commit 5873e6a1f8
)
2007-12-25 03:01:59 +01:00
Michael Adam
8e53343a74
Move drop_smbconf_internal() to libnet_conf.c
...
Michael
(This used to be commit 4c2a3396bb
)
2007-12-25 02:55:07 +01:00
Michael Adam
86486fcc98
Simplify libnet_smbconf_delshare().
...
Remove talloc context parameter.
Remove d_printf error message.
Michael
(This used to be commit 870d35c048
)
2007-12-25 02:37:02 +01:00
Michael Adam
9c20b9a731
Rename reg_delkey_internal() to libnet_smbconf_delshare().
...
Michael
(This used to be commit 7d501f0d78
)
2007-12-25 02:24:39 +01:00
Michael Adam
c9f65929b7
Move reg_delkey_internal() to libnet/libnet_conf.c
...
Michael
(This used to be commit c1b863fd05
)
2007-12-25 02:21:30 +01:00
Michael Adam
3177cece65
Do not leak memory in libnet_smbconf_delparm().
...
Michael
(This used to be commit 49cfe2b9eb
)
2007-12-24 01:03:14 +01:00
Michael Adam
713221e1c5
Do not leak memory in libnet_smbconf_setparm().
...
Michael
(This used to be commit a657b1c9f1
)
2007-12-24 01:00:46 +01:00
Michael Adam
92b1ef15df
Use the appropriate boolean constants.
...
Michael
(This used to be commit 45e3e2451a
)
2007-12-24 00:57:04 +01:00
Michael Adam
434f0bcb02
Make libnet_smbconf_value_exists() use talloc_stackframe().
...
And not pass a talloc context.
Michael
(This used to be commit 2983aba9d0
)
2007-12-24 00:56:24 +01:00
Michael Adam
c74579f491
Make libnet_smbconf_key_exists() use talloc_stackframe().
...
And not pass a talloc context.
Michael
(This used to be commit 7e8451f2f0
)
2007-12-24 00:53:22 +01:00
Michael Adam
225dbe6c02
Don't leak memory in libnet_smbconf_getparm().
...
Michael
(This used to be commit 09e62c7654
)
2007-12-24 00:47:43 +01:00
Michael Adam
44860bce54
Fix rights error in libnet_smbconf_delparm().
...
Introduced by additional test for existence of given parameter.
Michael
(This used to be commit 0fe095e85c
)
2007-12-24 00:18:35 +01:00
Michael Adam
6306005f4c
Remove redundant check of return value.
...
Michael
(This used to be commit 29f46c2d45
)
2007-12-24 00:18:35 +01:00
Michael Adam
8f163d5c5a
Move logic of net_conf_getparm() to libnet_conf.c.
...
Michael
(This used to be commit d3a20c4d5a
)
2007-12-24 00:18:35 +01:00
Michael Adam
d1c2280cd4
Rename libnet_reg_createkey_internal() to libnet_smbconf_reg_createkey_internal().
...
Michael
(This used to be commit 0e7f215f54
)
2007-12-23 04:10:32 +01:00
Michael Adam
a48f3c8a96
Make libnet_smbconf_set_global_param() call libnet_smbconf_setparm().
...
This not only removes duplicate logic, but also the use of
libnet_smbconf_reg_setvalue_internal() instead of do_modify_val_config()
which is removed, does add important tests and canonicalizations.
Michael
(This used to be commit fa84486649
)
2007-12-23 04:10:32 +01:00
Michael Adam
b6527f3d29
Reorder libnet_conf.c some, adding "section" comments.
...
Michael
(This used to be commit b9f22adfd3
)
2007-12-23 04:10:32 +01:00
Michael Adam
62f08d3dd9
Move net_conf_setparm() to libnet_conf.c
...
renaming it to libnet_smbconf_setparm()
Michael
(This used to be commit 60f49b22b5
)
2007-12-23 04:10:32 +01:00
Michael Adam
31d436e54c
Move reg_setvalue_internal() to libnet_conf.c
...
renaming it to libnet_smbconf_setvalue_internal()
Michael
(This used to be commit 7cb51a1d6d
)
2007-12-23 04:10:31 +01:00
Michael Adam
88a424a4d3
Remove occurrences of registry_key from libnet_join.c
...
Replace duplicated logic by calls of libnet_smbconf_set_global_param()
from libnet_conf.c, pushing logic from do_JoinConfig() and do_UnjoinConfig()
to do_join_modify_vals_config() and do_unjoin_modify_vals_config()
respectively.
Only the net_conf api functions should be exported by libnet_conf.c, not
the lower level registry access functions.
Michael
(This used to be commit 81b9f1301d
)
2007-12-23 04:10:31 +01:00
Michael Adam
bd2b8f0f7b
Replace direct deletion of registry value by use of libnet_smbconf_delparm().
...
Michael
(This used to be commit 415fc0a526
)
2007-12-23 04:10:31 +01:00
Michael Adam
b04708866f
Move logic of net_smbconf_delparm() to libnet/libnet_conf.c
...
Logic in new function libnet_smbconf_delparm().
Michael
(This used to be commit 0cff79e355
)
2007-12-23 04:10:31 +01:00
Michael Adam
ec3e8587ec
Move smbconf_value_exists() to libnet/net_conf.c
...
renaming it to libnet_smbconf_value_exists().
Michael
(This used to be commit ba71c68445
)
2007-12-23 04:10:31 +01:00
Michael Adam
aeea4bfadd
Make libnet_smbconf_open_path_q() static.
...
Michael
(This used to be commit 8cf8ed9de8
)
2007-12-23 04:10:31 +01:00
Günther Deschner
30a788bd20
Fix uninitialized error code in do_unjoin_modify_vals_config().
...
Guenther
(This used to be commit c890ebc3ca
)
2007-12-22 00:13:24 +01:00
Günther Deschner
3f5d5bc300
Until we better understand the WKSSVC_JOIN_FLAGS_JOIN_DC_ACCOUNT make sure we are
...
not joining as a DC.
Guenther
(This used to be commit bf3ffbb5d2
)
2007-12-21 23:05:10 +01:00
Günther Deschner
3537af86c4
Fix typo.
...
Guenther
(This used to be commit b95801db59
)
2007-12-21 15:29:11 +01:00
Günther Deschner
991112eda7
Implement NetServerSetInfo level 1005 in local mode with smbconf registry.
...
Guenther
(This used to be commit 15c2bc15f2
)
2007-12-21 15:29:11 +01:00
Günther Deschner
41467ffc6d
Add libnet_Unjoin(), libnet_UnjoinCtx and friends.
...
Guenther
(This used to be commit 89e8abb116
)
2007-12-21 15:29:11 +01:00
Günther Deschner
f3476faa36
In libnet join code, try lsa query with level 12 first.
...
Guenther
(This used to be commit f0e8d744c9
)
2007-12-21 15:29:10 +01:00
Günther Deschner
b6347c0693
Making do_DomainJoin return NTSTATUS again.
...
Guenther
(This used to be commit 91b8849898
)
2007-12-21 15:29:10 +01:00
Günther Deschner
c5a84374b6
Make sure we also support non-domain join.
...
Guenther
(This used to be commit c818f5505a
)
2007-12-21 15:29:10 +01:00
Günther Deschner
41410c86cc
Some libnet and netapi build fixes.
...
Guenther
(This used to be commit 1d47247283
)
2007-12-21 15:29:10 +01:00
Günther Deschner
5bf7319ac4
Add libnet_Join().
...
Heavily based on existing code in net_ads_join().
Guenther
(This used to be commit fb6315b68b
)
2007-12-21 15:29:10 +01:00
Günther Deschner
913d220e0b
Add libnet_JoinCtx structure.
...
Guenther
(This used to be commit 13c46b1407
)
2007-12-21 15:29:09 +01:00
Günther Deschner
1b5c1ae742
Very quick conversion of net_conf functions into the libnet_conf layer.
...
Certainly needs cleanup later.
Guenther
(This used to be commit 2b41ac926d
)
2007-12-21 15:29:09 +01:00