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

3740 Commits

Author SHA1 Message Date
Volker Lendecke
737c0a5473 dbwrap: dbwrap_fetch_int32->dbwrap_fetch_int32_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:27 +02:00
Volker Lendecke
2fd28dc4cf s3: Simplify tdb_data_is_cstr a bit
The original code contained rawmemchr for performance reasons. I
would expect the very common strlen routine to be not much worse
performance-wise than rawmemchr. On top, for me this patch simplifies
the expression a bit.

Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jun 14 16:55:58 CEST 2012 on sn-devel-104
2012-06-14 16:55:58 +02:00
Michael Adam
ba1699463b s3:smb: introduce a name TID_FIELD_INVALID for the invalid value for a cnum/tid
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-06-06 19:37:14 +02:00
Stefan Metzmacher
af4c99eed0 s3:utils: use smbd/smbd.h instead of just smbd/proto.h
This fixes compiler warnings regarding incomplete types.

metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
8693a4fff9 s3:lib: split things into a conn_tdb.h
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jun  5 19:28:35 CEST 2012 on sn-devel-104
2012-06-05 19:28:35 +02:00
Stefan Metzmacher
9cae92b485 s3:utils: use cli_tree_connect() instead of cli_tcon_andx()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed May 30 12:54:05 CEST 2012 on sn-devel-104
2012-05-30 12:54:05 +02:00
Luk Claes
764b5e5610 s3:libsmb: get rid of cli_negprot
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:49 +02:00
Luk Claes
1ff8c404a6 s3:libsmb: get rid of cli_state_server_time_zone
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:48 +02:00
Luk Claes
d8c0646a5d s3:libsmb: get rid of cli_state_protocol
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:45 +02:00
Luk Claes
4f6f4ea93c s3:libsmb: get rid of cli_state_remote_name
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:45 +02:00
Luk Claes
987e81b0ee s3:libsmb: get rid of cli_state_*_sockaddr
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:44 +02:00
Andrew Bartlett
e7e6276092 s3-utils: Use ads_do_search_retry in net ads search
This makes it possible to search against a slow server, as will
fallback from 1000 to (eventually) 125 users at a time.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat May 26 03:53:34 CEST 2012 on sn-devel-104
2012-05-26 03:53:34 +02:00
Simo Sorce
34a65739d3 Move source3/libads/dns.c to lib/addns 2012-05-23 17:51:48 +03:00
Simo Sorce
a7e94fce3f s3-ads-dns: Break dependency on lp_parm
In preparation of making this code common to s3 and s4
2012-05-23 17:51:48 +03:00
Volker Lendecke
fc77ee5171 s3: Fix Coverity ID 242710 Untrusted pointer read
According to susv3 we have to make sure that we call isupper with
values only in the range of an unsigned char. This is best achieved
by automatic narrowing through assignment.
2012-05-15 21:37:17 +02:00
Stefan Metzmacher
b4abd3faaf s3-auth: remove "security=server" (depricated since 3.6)
"security=server" has a lot of problems in the world with
modern security (ntlmv2 and krb5). It was also not very
reliable, as it needed a stable connection to the password
server for the lifetime of the whole client connection!

Please use "security=domain" or "security=ads" is you
authentication against remote servers (domain controllers).

metze
                       --------------
                      /              \
                     /      REST      \
                    /        IN        \
                   /       PEACE        \
                  /                      \
                  |      SEC_SERVER      |
                  |    security=server   |
                  |                      |
                  |                      |
                  |       12 May         |
                  |                      |
                  |        2012          |
                 *|     *  *  *          | *
        _________)/\\_//(\/(/\)/\//\/\///|_)_______
2012-05-15 08:18:28 +02:00
Volker Lendecke
aa220c4981 s3: Fix Coverity ID 242725 Uninitialized scalar variable
Not a functional bug, but we copy all of the "key" structure inside
dcerpc_winreg_CreateKey.
2012-05-10 09:11:57 +02:00
Volker Lendecke
dead2168a2 s3: Fix Coverity ID 242726 Uninitialized scalar variable
Not a functional bug, but we copy all of the "key" structure inside
dcerpc_winreg_OpenKey.
2012-05-10 09:11:57 +02:00
Volker Lendecke
4e05717559 s3: Fix Coverity ID 242754 Dereference null return value 2012-05-10 09:11:57 +02:00
Karolin Seeger
48d57d7636 s3-net: Fix typo in comment.
Karolin
2012-05-08 16:46:33 +02:00
Christof Schmitt
be8180e030 net: Let get*sid return error from passdb init
When initialize_password_db returns an error this means that the SID
stored in the backend cannot be read. Return this error directly
instead of creating a random SID through get_global_sam_sid.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Apr 30 13:07:20 CEST 2012 on sn-devel-104
2012-04-30 13:07:20 +02:00
Gregor Beck
36cb40ef2b s3:registry: remove usage of reg_objects from net_rpc_printer.c
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:23:04 +02:00
Gregor Beck
4eb4f75371 s3:eventlogadm make a transaction for addsource
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:23:03 +02:00
Gregor Beck
c6224e46aa s3:eventlogadm reimplement addsource using reg_api
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-04-25 14:22:17 +02:00
Volker Lendecke
d38a171a43 s3: Attempt to fix the build without kerberos
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Tue Apr 24 15:04:14 CEST 2012 on sn-devel-104
2012-04-24 15:04:13 +02:00
Simo Sorce
08c733d75f Make krb5 wrapper library common so they can be used all over 2012-04-23 19:20:38 -04:00
Michael Adam
c0ba8295f2 s3:smbcontrol: remove an unused variable
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Apr 21 00:55:13 CEST 2012 on sn-devel-104
2012-04-21 00:55:09 +02:00
Michael Adam
499e7372be s3:id_cache: do not use the in-memory idmap cache (it is going to be removed)
This also removes the ID_CACHE_FLUSH message.
2012-04-20 23:17:36 +02:00
Volker Lendecke
1be6d849ab s3-g_lock: Use dbwrap_record_watch_send/recv
This simplifies the g_lock implementation. The new implementation tries to
acquire a lock. If that fails due to a lock conflict, wait for the g_lock
record to change. Upon change, just try again. The old logic had to cope with
pending records and an ugly hack into ctdb itself. As a bonus, we now get a
really clean async g_lock_lock_send/recv that can asynchronously wait for a
global lock. This would have been almost impossible to do without the
dbwrap_record_watch infrastructure.
2012-04-19 22:24:19 +02:00
Volker Lendecke
1b5b38a615 s3-dbwrap: Add "listwatchers" to dbwrap_tool 2012-04-19 22:24:19 +02:00
Volker Lendecke
3f18316358 s3: Fix Coverity ID 2727 to 2740 -- UNINIT 2012-04-19 20:52:27 +02:00
Volker Lendecke
9ce9389b29 s3: Fix a "ISO C90 forbids mixed declarations and code"
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Apr 19 10:32:27 CEST 2012 on sn-devel-104
2012-04-19 10:32:27 +02:00
Volker Lendecke
8ed7ff483c s3: Add smbstatus -N to output the notify db
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Tue Apr 17 11:54:35 CEST 2012 on sn-devel-104
2012-04-17 11:54:35 +02:00
Volker Lendecke
ee4f2abbda s3: Add "notify-cleanup" to smbcontrol
This triggers a notify cleanup run which would normally only run periodically
2012-04-17 10:21:03 +02:00
Björn Baumbach
7ff42f3746 s3-utils: add do_reload_printers command to smbcontol
Add command to force smbd to reload printers by sending MSG_PRINTER_PCAP.
2012-04-06 08:19:13 +02:00
Andrew Bartlett
f6e0532024 build: Remove SMB_STRUCT_DIR define 2012-04-05 02:39:09 +02:00
Andrew Bartlett
2320b2144f build: Remove SMB_STRUCT_DIRENT define 2012-04-05 02:39:09 +02:00
Andrew Bartlett
3e8a6e5760 build: Remove sys_closedir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
afdb78075c build: Remove sys_readdir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
fe526bb32b build: Remove sys_opendir wrapper 2012-04-05 02:39:09 +02:00
Andrew Bartlett
d166b79852 build: Remove sys_open wrapper 2012-04-05 02:39:08 +02:00
Andrew Bartlett
1c7c432874 s3-ntlm_auth: use manage_gensec_request for squid-2.5-ntlmssp
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:32 +02:00
Andrew Bartlett
f3b005e759 s3-auth: Order GENSEC mechs by priority, krb5 before NTLMSSP
Otherwise, really simple clients (such as the current ntlm_auth gss-spnego client)
will not select krb5.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:32 +02:00
Andrew Bartlett
893387d25f s3-ntlm_auth: add ntlm_auth_generate_session_info_pac()
Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:32 +02:00
Andrew Bartlett
4ccac90793 s3-ntlm_auth Use GENSEC for gss-spnego server
This imports the gensec handling code from the source4 ntlm_auth, which
will eventually be used for all the NTLMSSP and SPNEGO clients and servers
but which is only used for gss-spnego for now.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:31 +02:00
Jeremy Allison
959516d61b More strlcat/strlcpy truncate checks. 2012-03-30 21:26:07 +02:00
Jelmer Vernooij
c9fb33697d use usleep rather than sys_usleep in various places, in anticipation of usleep moving to libreplace. 2012-03-24 22:41:05 +01:00
Andrew Bartlett
49bb7f248a s3-krb5: Remove GSS_WRAP_IOV conditional
We already confirm that we have this functionality before we set HAVE_KRB5 at
configure time.

Andrew Bartlett
2012-03-15 09:29:02 +11:00
Björn Jacke
7bd1dc5dd5 s3: fix build on AIX
Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Sat Mar 10 19:07:20 CET 2012 on sn-devel-104
2012-03-10 19:07:20 +01:00
Andrew Bartlett
d7bb961859 s3-auth: Remove security=share (depricated since 3.6).
This patch removes security=share, which Samba implemented by matching
the per-share password provided by the client in the Tree Connect with
a selection of usernames supplied by the client, the smb.conf or
guessed from the environment.

The rationale for the removal is that for the bulk of security=share
users, we just we need a very simple way to run a 'trust the network'
Samba server, where users mark shares as guest ok.  This is still
supported, and the smb.conf options are documented at
https://wiki.samba.org/index.php/Public_Samba_Server

At the same time, this closes the door on one of the most arcane areas
of Samba authentication.

Naturally, full user-name/password authentication remain available in
security=user and above.

This includes documentation updates for username and only user, which
now only do a small amount of what they used to do.

Andrew Bartlett

                       --------------
                      /              \
                     /      REST      \
                    /        IN        \
                   /       PEACE        \
                  /                      \
                  |      SEC_SHARE       |
                  |    security=share    |
                  |                      |
                  |                      |
                  |       5 March        |
                  |                      |
                  |        2012          |
                 *|     *  *  *          | *
        _________)/\\_//(\/(/\)/\//\/\///|_)_______
2012-03-04 23:33:05 +01:00
Matthieu Patou
7916d64bbd s3: print a nice warning when HAVE_ADS is not enabled but you still try to do net rpc keytab vampire 2012-03-04 07:55:46 +01:00
Andrew Bartlett
74c6d2bcf4 s3-ntlm_auth fix up gss-spnego-client so as to work with gss-spnego
The SPNEGO code changed since this was last tested.

Andrew Bartlett
2012-03-01 22:04:45 +11:00
Andrew Bartlett
4dae0e7ec5 s3-ntlm_auth: Wrap kerberos token in GSSAPI
While windows will accept this ticket without the wrapping, it is
nicer to follow the standard and wrap it up in GSSAPI.

This should allow the ntlm_auth gss-spnego-client to talk to
the ntlm_auth gss-spengo server.

Reported by Christof Schmitt <christof.schmitt@us.ibm.com>

Andrew Bartlett
2012-03-01 22:04:45 +11:00
Andrew Bartlett
5b700cb0e3 s3-ntlm_auth: Add --target-service and --target-hostname options
This will allow the gss-spnego-client protocol to work with modern
SPNEGO servers that do not send the principal in the mechListMIC.

Andrew Bartlett
2012-03-01 22:04:45 +11:00
Jeremy Allison
0e6213b1ae Remove unused function. 2012-02-24 09:25:30 -08:00
Andrew Bartlett
9de7fb8706 s3-ntlm_auth: Convert ntlm_auth to use gensec_ntlmssp server-side
This uses the common gensec_ntlmssp server code for ntlm_auth, removing
the last non-gensec use of the NTLMSSP server.

Andrew Bartlett
2012-02-24 11:23:18 +11:00
Andrew Bartlett
1c7725ae8a s3-utils: Remove unused connect_to_ipc_krb5()
Found by callcatcher.

Andrew Bartlett
2012-02-23 16:14:19 +11:00
Andrew Bartlett
f91c616176 s3-ntlm_auth: allow ntlm_auth --diagnostics to pass again
This still requires that the server permit LM passwords, but our s3dc test
environment has this enabled.

Andrew Bartlett
2012-02-20 10:50:48 +11:00
Christopher R. Hertel (crh)
b5b204184a Rename obscure defined constants.
Replaced the undescriptive SMB_PORT1 and SMB_PORT2 defined constants
with the slightly more descriptive names NBT_SMB_PORT and TCP_SMB_PORT.
Also replaced several hard-coded references to the well-known port
numbers (139 and 445, respectively) as appropriate.

Small changes to clarify some comments regarding the two transport
types.

Signed-off-by: Simo Sorce <idra@samba.org>

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Thu Feb 16 08:29:41 CET 2012 on sn-devel-104
2012-02-16 08:29:41 +01:00
Andreas Schneider
419e92b149 s3-net: Don't use an internal krb5 for kdc lookup.
This replaces the use of the internal krb5_locate_kdc() function with
our own get_kdc_list() function.

Signed-off-by: Günther Deschner <gd@samba.org>
2012-02-09 12:42:30 +01:00
Jeremy Allison
571ee0b1ff Only ask for specific permissions required when setting an ACL.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Feb  3 03:07:33 CET 2012 on sn-devel-104
2012-02-03 03:07:32 +01:00
Michael Adam
8972c92342 s3:net ads join: remove a useless empty comment block
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Jan 31 18:37:45 CET 2012 on sn-devel-104
2012-01-31 18:37:45 +01:00
Michael Adam
976672bf80 s3:net ads join: add a comment for the call to _net_ads_join_dns_update() 2012-01-31 17:00:30 +01:00
Michael Adam
be312e76d2 s3:net ads join: reduce indentation in _net_ads_join_dns_updates() 2012-01-31 17:00:30 +01:00
Michael Adam
7e5c5bdcc4 s3:net ads join: move dns update code out to new function _net_ads_join_dns_updates() 2012-01-31 17:00:30 +01:00
Michael Adam
1768d3621a s3:net ads join: improve comment for dns update block 2012-01-31 17:00:30 +01:00
Michael Adam
8f9b43281d s3:net ads join: improve status evaluation for call to net_update_dns()
untangle assignment from check and log error code in message if failed.
2012-01-31 17:00:30 +01:00
Michael Adam
9cd7b8f04d s3:net ads join: interpret return code of ads_kinit_password() in dns update block
If failed, print according error message and skip the attempt to do dns update.
2012-01-31 17:00:30 +01:00
Michael Adam
4831b6e6bb s3:net ads join: check for malloc success and react accordingly in dns update block 2012-01-31 17:00:30 +01:00
Michael Adam
ca913c98a6 s3:net ads join: check for success of fetching machine password in dns update block
log and cleanup accordingly if failed
2012-01-31 17:00:30 +01:00
Michael Adam
04fa9a389c s3:net ads join: untangle assignment from check, fix return code and improve error logging
only the dns update failed, not the join.
Also do proper memory cleanup
2012-01-31 17:00:30 +01:00
Michael Adam
63d9b5d75a s3:net ads join: reduce indentation and improve logging in the dns update code block
by doing an early goto done upon error condition
2012-01-31 17:00:30 +01:00
Michael Adam
1d83f2118e s3:net ads join: untangle assignment from check. 2012-01-31 17:00:30 +01:00
Michael Adam
dc4cf82fb5 s3:net registry: fix a copy and paste error in a help text 2012-01-31 17:00:30 +01:00
Volker Lendecke
7722e637b8 s3: Remove a typedef
We have it in README.Coding to avoid typedef for structs, but I
think it also applies to enums.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jan 24 22:45:50 CET 2012 on sn-devel-104
2012-01-24 22:45:49 +01:00
Volker Lendecke
637838a1a9 s3: Remove a typedef 2012-01-24 21:10:37 +01:00
Andrew Bartlett
40715e1251 s3-librpc: pass struct ndr_interface_table down to cli_pipe_open_generic/spnego()
This allows the target service (as determined from the IDL) to be
passed to GSSAPI (rather than the current, incorrect, "cifs").

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-18 16:23:24 +01:00
Andrew Bartlett
9729bdf89f s3-utils/net: pass struct ndr_interface_table down
This will allow the target service (as determined from the IDL) to be
passed to GSSAPI (rather than the current, incorrect, "cifs").

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-18 16:23:24 +01:00
Andrew Bartlett
60e1aa701c s3-build: Rework object lists to allow gse gensec module
This also allows the spnego_parse_krb5_wrap() function to be shared.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-18 16:23:22 +01:00
Volker Lendecke
45e61fcf61 s3: Add a "lock_order" argument to db_open
This will be used to enforce a lock hierarchy between the databases. We have
seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb.
These should be fixed by refusing a dbwrap_fetch_locked that does not follow a
defined lock hierarchy.
2012-01-18 14:48:04 +01:00
Stefan Metzmacher
ecd8fcdb1e s3:smbcontrol: avoid using messaging_event_context()
metze
2012-01-17 08:10:29 +01:00
Stefan Metzmacher
77d1053c29 s3:smbcontrol: pass tevent_context down to wait_replies()
metze
2012-01-17 08:10:29 +01:00
Stefan Metzmacher
e5ee6d3a24 s3:smbcontrol: pass tevent_context down to subcommands
metze
2012-01-17 08:10:28 +01:00
Volker Lendecke
cfebba96bd s3: Put an indirection layer into share_mode_lock
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-01-12 23:59:22 +01:00
Andrew Bartlett
b89a0439b3 s3-librpc Rename and rework cli_rpc_pipe_open_ntlmssp() to be generic
This also includes renaming the helper function
rpccli_ntlmssp_bind_data, and allows this function to operate on any
gensec-supplied auth type.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-11 09:04:41 +01:00
Jeremy Allison
d583df1205 Fix bug #8687 - net memberships usage info is wrong
Typo in usage.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Jan  6 00:30:20 CET 2012 on sn-devel-104
2012-01-06 00:30:19 +01:00
Amitay Isaacs
9e2d4b61de s3-net: Fix the return codes. 0 on success, -1 on failure
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon Dec 19 01:57:24 CET 2011 on sn-devel-104
2011-12-19 01:57:24 +01:00
Stefan Metzmacher
92280def16 s3:smbcontrol: remove unused "samsync" and "samrepl" commands
metze
2011-12-13 12:36:36 +01:00
Volker Lendecke
0f9d14820e s3: Remove a bunch of calls to procid_self()
All callers to messaging_[re]init only used procid_self()
2011-12-12 21:50:25 +01:00
Michael Adam
891258cd70 s3:net registry check: replace rawmemchr by functionally equivalent portable strchr
rawmemchr is glibc only - not portable. Remarked by Ira Cooper.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Dec  6 12:20:48 CET 2011 on sn-devel-104
2011-12-06 12:20:48 +01:00
Michael Adam
958e4f51d2 Revert "Remove rawmemchr calls - found by Ira Cooper. These are glibc-specific calls, makes us completely non-portable."
This reverts commit 82b1702284.

This is not functionally equivalent, needs to be done differently.
2011-12-06 10:45:43 +01:00
Jeremy Allison
c8a1082f2b Move the callers that need to use the new cli_open() back to calling
it from cli_openx().
2011-12-03 21:36:47 -08:00
Jeremy Allison
4e709dc42f Rename cli_open -> cli_openx. Prelude to replacing generic cli_open()
with a call that uses NTCreateX in preference to OpenAndX.
2011-12-03 21:13:08 -08:00
Gregor Beck
d74b3f941f lib/util: factor out tdb_data_is_empty
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Dec  3 05:20:30 CET 2011 on sn-devel-104
2011-12-03 05:20:30 +01:00
Gregor Beck
5bc44491d2 s3:net: adapt idmap check to new dbwrap_fetch behavior not to return success if not found
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-03 03:48:31 +01:00
Volker Lendecke
1c46fb5c3e s3: Use autogenerated open_files.idl 2011-12-02 22:43:05 +01:00
Gregor Beck
3ab37a0d0e s3:net registry check: adapt to new semantic of dbwrap_fetch with rbt
Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Nov 29 19:53:30 CET 2011 on sn-devel-104
2011-11-29 19:53:30 +01:00
Gregor Beck
bca2677afe s3:net registry check: adapt to new semantic of dbwrap_fetch
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-29 18:20:06 +01:00
Gregor Beck
bba62cdb0c s3:net registry check: handle missing version info
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-29 18:20:06 +01:00
Gregor Beck
c1d83b0ff2 s3:dbwrap_torture: code cleanup
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-29 18:20:06 +01:00
Gregor Beck
2d9b4015d6 s3:net registry check: improve console output
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-25 13:24:34 +01:00
Stefan Metzmacher
c6ed8e3211 s3:utils: make use of cli_tree_connect()
metze
2011-11-24 19:02:32 +01:00
Jeremy Allison
82b1702284 Remove rawmemchr calls - found by Ira Cooper. These are glibc-specific calls, makes us completely non-portable.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Nov 18 23:50:50 CET 2011 on sn-devel-104
2011-11-18 23:50:50 +01:00
Andrew Bartlett
87bbe1be5f s3-net Do not look for a local SID when we are a DC
If we are actually a DC, then the only SID we have is the domain SID,
and looking for it under the local name fails if we are a Samba4 AD DC.

Andrew Bartlett
2011-11-17 00:34:09 +01:00
Günther Deschner
65e2944c67 s3-smbldap: extend smbldap_init() with binddn/bindsecret arguments.
Guenther
2011-11-16 12:26:26 +01:00
Günther Deschner
636fa7a2cd s3-net: use better state variable name for smbldap_state.
Guenther
2011-11-16 12:26:26 +01:00
Günther Deschner
8312ee1367 s3-passdb: split out passdb/pdb_ldap_schema.c
Guenther
2011-11-16 12:26:26 +01:00
Günther Deschner
28f8ccbe8b s3: move smbldap_util to pdb_ldap_util.
Guenther
2011-11-16 12:26:26 +01:00
Stefan Metzmacher
92a6f577ce s3:utils: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:12 +01:00
Björn Baumbach
bdc973b5db s3-utils: net - Fix one error/usage message
Signed-off-by: Michael Adam <obnox@samba.org>
2011-11-03 10:13:40 +01:00
David Disseldorp
8b375eef24 s3: fix typo in net ads join output
Space missing from "DNS update in aclustered setup".

Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Mon Oct 31 16:01:35 CET 2011 on sn-devel-104
2011-10-31 16:01:35 +01:00
Günther Deschner
151bb290d1 s3-net: Make sure to always re-use the "good" dc for the DNS updates as well.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Oct 28 19:13:49 CEST 2011 on sn-devel-104
2011-10-28 19:13:49 +02:00
Björn Baumbach
2fac12b276 s3-util: dbwrap_tool: fix fetch_string function
We do not want truncated strings.

Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Oct 26 04:17:05 CEST 2011 on sn-devel-104
2011-10-26 04:17:05 +02:00
Gregor Beck
f881d43837 s3:net registry check: fix a case where automatic and read only mode take the wrong action
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-26 02:44:03 +02:00
Gregor Beck
4fe5e091e1 s3:net registry check: do not silently replace separators
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-26 02:44:03 +02:00
Björn Baumbach
196fd14788 s3-util: dbwrap_tool: add fetch fuctions for hex and string
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-18 20:58:26 +02:00
Björn Baumbach
140b5d790a s3-util: dbwrap_tool: add store hex function
Allows the user to store hex blobs in a tdb.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-18 20:58:26 +02:00
Andrew Bartlett
0c6e4adcb2 ntlmssp: Move ntlmssp code to auth/ntlmssp
This brings in the code from both libcli/auth and
source4/auth/ntlmssp.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-18 13:13:31 +11:00
Jeremy Allison
7c663731ba Remove unused function. 2011-10-14 14:01:24 -07:00
Günther Deschner
af82bf2ac5 s3-net: Fix uninitialized variable in rpc_conf_import_internal().
Michael, please check.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Oct 14 19:25:47 CEST 2011 on sn-devel-104
2011-10-14 19:25:47 +02:00
Michael Adam
b15d3251ac s3:net registry: fix segfault when net registry is called without subcommands...
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Oct 14 17:51:53 CEST 2011 on sn-devel-104
2011-10-14 17:51:53 +02:00
Björn Baumbach
df9c4b0702 s3-utils: add capabilities to dbwrap_tool
Make it possible to work with strings in addition to int32 and uint32.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-14 15:11:09 +02:00
Gregor Beck
89b76b5611 s3:smbcacls: fix violation of coding conventions
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Gregor Beck
491afa3a4c s3:net: avoid unnecessary initialization of the registry.
This allows for using help without having access to the registry and
prevents update code to run if only a readonly check is to be performed.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Gregor Beck
502f0b8edc s3:net: add command registry check
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Gregor Beck
e430c75d4c s3:net: factor out interact_edit()
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Michael Adam
b8eec18e39 s3:smbcacls: make get_domain_sid() static 2011-10-12 22:45:52 +02:00
Simo Sorce
995d156726 s3-group-mapping: Remove fstrings from GROUP_MAP.
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 12 19:28:12 CEST 2011 on sn-devel-104
2011-10-12 19:28:12 +02:00
Gregor Beck
9d688cd7be s3:smbcacls fix leaking talloc stackframce on tcon failure
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Gregor Beck
858e4cb1b6 s3:smbcacls fix possible SEGFAULT
sddl_encode returns NULL on failure

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Gregor Beck
724b48bc08 s3:smbcacls add option domain-sid
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Gregor Beck
61631f427a s3:smbcacls get_domain_sid for sddl parsing/formating from lsarpc
get_global_sid panics if we are not root and may give the wrong answer anyway.

Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Gregor Beck
2c78d4c89d s3:smbcacls pretty print acl control field
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 03:49:05 +02:00
Michael Adam
c9bc1e4924 s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return type
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
658f72128f s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of bool)
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
603c3e1bcb s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return code
Return the int32 value retrieved from the db by reference.
Before this, return value "-1" was used as a error indication,
but it could also be a valid value from the database.
2011-10-11 14:17:58 +02:00
Michael Adam
7458aac0f1 s3:net: convert net idmap check to use dbwrap wrapper functions.
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
1f57f9ed13 s3:net: convert net idmap to use only dbwrap wrapper functions
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
c8924ecc41 s3:net: convert net serverid to only use dbwrap wrapper functions
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:56 +02:00
Michael Adam
5bfdd73a64 s3:net: fix the exit code of net serverid wipe 2011-10-11 14:17:56 +02:00
Michael Adam
86455646e3 s3:net: fix the exit code of net serverid list 2011-10-11 14:17:56 +02:00
Michael Adam
0b7108b342 s3:dbwrap_torture: convert to using wrapper functions only 2011-10-11 14:17:56 +02:00
Michael Adam
64748e8eec s3:dbwrap_tool: convert to using wrapper functions only 2011-10-11 14:17:56 +02:00
Michael Adam
0e28448a78 s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS 2011-10-11 14:17:56 +02:00
Michael Adam
8f098a635f s3:dbwrap: change the dbwrap_traverse() wrapper to return the count in an additional parameter 2011-10-11 14:17:55 +02:00
Michael Adam
7a72c84ee7 s3:dbwrap: move the db_open_rbt() prototype to a new header dbwrap_rbt.h 2011-10-11 14:17:55 +02:00
Günther Deschner
7119c8ba14 s3-net: when all DNS servers fail to operate, the overal DNS registration result
must be a failure.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 10 15:59:20 CEST 2011 on sn-devel-104
2011-10-10 15:59:20 +02:00
Stefan Metzmacher
2a6c5c8edb s3:utils: avoid '//' comments
The compiler on openindiana doesn't like them.

metze
2011-10-08 07:24:14 +02:00
Kai Blin
da0cae010a s3 net: Fix a discard const warning 2011-09-28 02:02:35 +02:00
Kai Blin
b02bbf237c net: Don't register link local addresses with DNS 2011-09-24 21:46:06 -07:00