1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-21 01:59:07 +03:00

54 Commits

Author SHA1 Message Date
Jelmer Vernooij
24e1030090 r11244: Relative path names in .mk files 2007-10-10 13:45:06 -05:00
Andrew Bartlett
0d93f11c89 r10711: An error of 'user exists' is not an error, just an indication of how
the join was processed.

Andrew Bartlett
2007-10-10 13:39:23 -05:00
Andrew Bartlett
d6fa105fda r10486: This is a merge of Brad Henry's 'net join' rework, to better perform
an ADS join, particularly as a DC.  This represents the bulk of his
Google SOC work, and I'm very pleased to intergrate it into the tree.
(Metze will intergrate the DRSUAPI work later).

Both metze and myself have also put a lot of time into this patch, and
in mentoring Brad in general.  In return, Brad has been a very good
student, and has taken the comments well.

Since it's last appearance on samba-technical@, I have made
correctness and valgrind fixups, as well as adding a new 'BINDING'
mode to the libnet_rpc routines.  This allows the exact binding string
to be passed down from the torture code, including options and exact
target host.

Andrew Bartlett
2007-10-10 13:38:53 -05:00
Andrew Bartlett
194e8f07c0 r10402: Make the RPC-SAMLOGON test pass against Win2k3 SP0 again.
I still have issues with Win2k3 SP1, and Samba4 doesn't pass it's own
test for the moment, but I'm working on these issues :-)

This required a change to the credentials API, so that the special
case for NTLM logins using a principal was indeed handled as a
special, not general case.

Also don't set the realm from a ccache, as then it overrides --option=realm=.

Andrew Bartlett
2007-10-10 13:38:39 -05:00
Jelmer Vernooij
0963ab9c14 r10316: More dynconfig fixes 2007-10-10 13:38:17 -05:00
Jelmer Vernooij
200a8f6652 r9792: Rename StrCaseCmp -> strcasecmp_m. All these years I was thinking
StrCaseCmp was sys_strcasecmp, while it is in fact strcasecmp_m!
2007-10-10 13:35:01 -05:00
Andrew Bartlett
6202267f6e r9728: A *major* update to the credentials system, to incorporate the
Kerberos CCACHE into the system.

This again allows the use of the system ccache when no username is
specified, and brings more code in common between gensec_krb5 and
gensec_gssapi.

It also has a side-effect that may (or may not) be expected: If there
is a ccache, even if it is not used (perhaps the remote server didn't
want kerberos), it will change the default username.

Andrew Bartlett
2007-10-10 13:34:54 -05:00
Jelmer Vernooij
ce0935112b r8966: Simplify the makefile generation system a bit.
Autogenerate list of binaries (rather then having them hardcoded in build/smb_build/makefile.pm)
Add INSTALLDIR keyword to .mk files
2007-10-10 13:31:00 -05:00
Andrew Bartlett
d2789c4260 r8847: Rework the Samba4 'net join' code. I'm trying to get this closer to
what WinXP does when joining an AD domain, but in the meantime this
removes the excess unions, and uses the LSA pipe in same way XP does.

Andrew Bartlett
2007-10-10 13:30:11 -05:00
Andrew Bartlett
1e0f7792bb r8752: With all the infrustructure done, details like a SamSync migration
into LDB are actually quite easy.

This brings us the users, and sets basic domain information.

You are expected to have provisioned with the settings for the target
domain, and have joined the domain as a BDC.  Then simply 'net
samsync'.

Now we just need to flesh out the delta types.

Andrew Bartlett
2007-10-10 13:30:02 -05:00
Andrew Tridgell
9411bd4e5e r8748: fixed build. Andrew, please check. 2007-10-10 13:30:01 -05:00
Andrew Tridgell
3a3025485b r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
2007-10-10 13:18:15 -05:00
Andrew Bartlett
50f3c2b3a2 r7525: Unify lp_load(), load_interfaces and logging setup into popt().
There is now a new --debug-stderr option to enable debug to STDERR.

popt isn't perfect, but the callbacks are used in all the main Samba
binaries, and should be used in the rest.  This avoids duplicated
code, and ensures every binary is setup correctly.

This also ensures the setup happens early enough to have -s function,
and have a correct impact on the credentials code.  (Fixing a bug that
frustrated tridge earlier today).

The only 'subtle' aspect of all this is that I'm pretty sure that the
SAMBA_COMMON popt code must be above the CREDENTIALS code, in the
popt tables.

Andrew Bartlett
2007-10-10 13:18:06 -05:00
Rafal Szczesniak
a50ebd4a16 r7382: Convert net_user code so that is can be compiled against
changed CreateUser call. Doesn't work yet, but the test
passes.

rafal
2007-10-10 13:17:48 -05:00
Jelmer Vernooij
e7549f33f5 r7249: Cope with struct member rename 2007-10-10 13:17:31 -05:00
Andrew Bartlett
550f17f992 r6573: Start on my project to implement an NT4 compatible BDC in Samba4.
This brings in a compatability layer for Samba3 in Samba4 - where we
will start to define file formats and similar details.

The 'net samdump' command uses 'password server = ' for now, and
performs a similar task to Samba3's 'net rpc samsync'.

Andrew Bartlett
2007-10-10 13:16:27 -05:00
Jelmer Vernooij
e5bc6f4f17 r5924: Use cli_credentials in libnet/. 2007-10-10 13:11:08 -05:00
Jelmer Vernooij
1d49b57c50 r5917: First step in using the new cli_credentials structure. This patch
puts support for it into popt_common, adds a few utility functions
(in lib/credentials.c) and the callback functions for the command-line
(lib/cmdline/credentials.c). Comments are welcome :-)
2007-10-10 13:11:08 -05:00
Rafal Szczesniak
eb66180d14 r5425: Convert function tables to new structure (with description)
and remove unnecessary help functions as help is generated
automatically. Usage functions with precise information about
usage of each leaf node remain.

rafal
2007-10-10 13:10:44 -05:00
Rafal Szczesniak
24f7a3860e r5424: Automatically generate basic help display on basis of name
and description from function table.

rafal
2007-10-10 13:10:44 -05:00
Rafal Szczesniak
48568959a8 r5423: Change function table structure to allow short description
of command groups. Also give up help function pointer in the
structure since it's needed only in leaf nodes of command tree,
and leaf nodes decide about help on their own. Usage function
is still available on all levels.

rafal
2007-10-10 13:10:44 -05:00
Rafal Szczesniak
5cebb4feed r5400: Slightly better handling of help messages in net tool.
rafal
2007-10-10 13:10:41 -05:00
Rafal Szczesniak
3005f0408c r5381: Added net_user.c with net tool interface for managing user accounts.
rafal
2007-10-10 13:09:49 -05:00
Rafal Szczesniak
d8fa9baf24 r5380: Removed extra newline.
rafal
2007-10-10 13:09:49 -05:00
Andrew Tridgell
bf43c9bdcf r5308: trimmed back a lot of the old macros from smb_macros.h 2007-10-10 13:09:40 -05:00
Andrew Tridgell
9db6c79e90 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
2007-10-10 13:09:38 -05:00
Andrew Tridgell
ec32b22ed5 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
2007-10-10 13:09:15 -05:00
Andrew Bartlett
54a231780e r4762: Store the results of a 'net join' in the LDB.
Like Samba3, the storage of the primary domain password is keyed off
the domain name, so we can join multiple domains, and just swap
'workgroup =' around.

Andrew Bartlett
2007-10-10 13:08:51 -05:00
Andrew Bartlett
a9b9606091 r4722: Start to add 'net join' to Samba4.
Andrew Bartlett
2007-10-10 13:08:48 -05:00
Tim Potter
d8b1ba93a8 r4341: Fix const warning. 2007-10-10 13:07:36 -05:00
Tim Potter
1d96717843 r4201: Remove duplicate const. 2007-10-10 13:07:26 -05:00
Andrew Tridgell
0928b1f5b6 r4037: fixed a bunch of "might be uninitialised" warnings after enabling -O1 in my compile 2007-10-10 13:06:16 -05:00
Jelmer Vernooij
64826da834 r3733: More build system fixes/features:
- Use .mk files directly (no need for a SMB_*_MK() macro when adding a new SUBSYSTEM, MODULE or BINARY). This allows addition of new modules and subsystems without running configure
 - Add support for generating .dot files with the Samba4 dependency tree (as used by the graphviz and springgraph utilities)
2007-10-10 13:05:47 -05:00
Andrew Tridgell
5205f598b8 r3633: - moved module init functions to after smb.conf and command line
parsing, so that module init can take account of lp_ parms (thats
  why gensec:krb5=no wasn't working)

- added a BASE-DISCONNECT torture test that tests server response to
  clients disconnecting with open lock and open requests pending
2007-10-10 13:05:41 -05:00
Jelmer Vernooij
7a8244761b r3586: Fix some of the issues with the module init functions.
Both subsystems and modules can now have init functions, which can be
specified in .mk files (INIT_FUNCTION = ...)

The build system will define :
 - SUBSYSTEM_init_static_modules that calls the init functions of all statically compiled modules. Failing to load will generate an error which is not fatal
 - BINARY_init_subsystems that calls the init functions (if defined) for the subsystems the binary depends on

This removes the hack with the "static bool Initialised = " and the
"lazy_init" functions
2007-10-10 13:05:36 -05:00
Andrew Tridgell
041f77b6a1 r3579: with the gcc warning flag from abartlet we don't need sys_strftime() 2007-10-10 13:05:34 -05:00
Andrew Tridgell
558de54ec6 r3494: got rid of include/rewrite.h, and split out the dynconfig.h header 2007-10-10 13:05:22 -05:00
Andrew Tridgell
8e9212ecfc r3478: split out some more pieces of includes.h 2007-10-10 13:05:20 -05:00
Andrew Tridgell
10188869ef r3454: moved a few more things out if includes.h into the include/system/ include files.
this brings us down to about 11k lines of headers included with
includes.h, while still retaining the speed of building with pch
2007-10-10 13:05:13 -05:00
Andrew Tridgell
7b7477ac42 r3453: - split out the auth and popt includes
- tidied up some of the system includes

- moved a few more structures back from misc.idl to netlogon.idl and samr.idl now that pidl
  knows about inter-IDL dependencies
2007-10-10 13:05:13 -05:00
Andrew Tridgell
264ce91810 r3447: more include/system/XXX.h include files 2007-10-10 13:05:12 -05:00
Andrew Tridgell
5921587ec2 r3323: more warning reductions 2007-10-10 13:04:55 -05:00
Andrew Tridgell
dce43a535c r2074: fixed a typo 2007-10-10 12:58:23 -05:00
Stefan Metzmacher
ea14b2780f r2066: add 'net time' command
use it like:

net time <server>
net time <server> -U "" -N
net time <server> -U DOM\\user
...

metze
2007-10-10 12:58:23 -05:00
Stefan Metzmacher
b660e5b9e6 r1951: add 'net password set' call
use it like:
net password set user
net password set DOM\\user
net password set user pass
net password set DOM\\user pass
net password set -U DOM\\Administrator%admpass DOM\\user pass

metze
2007-10-10 12:58:13 -05:00
Stefan Metzmacher
d14a01533c r1949: provide functions to access the username, userdomain and userpassword
now you're prompted when cmdline_get_userpassword() is called
and the password is not yet known

metze
2007-10-10 12:58:13 -05:00
Stefan Metzmacher
f1b9c1f3dd r1919: paasword change basicly works now:-)
but we need to find the real pdc for the users domain
and fallback to other levels

metze
2007-10-10 12:58:11 -05:00
Stefan Metzmacher
aedb2e9e1c r1915: use popt's cmdline_auth_info to fill the net_context
and print the user domain when prompting for a new password

metze
2007-10-10 12:58:11 -05:00
Stefan Metzmacher
52b866c403 r1914: use common popt stuff in net
metze
2007-10-10 12:58:11 -05:00
Stefan Metzmacher
6ad57a86c8 r1880: bugger, now I have used gcc 3.4.1 myself and have statements before declarations
Does any knows if there are flags to let gcc 3.4.1 fail with that?

metze
2007-10-10 12:58:08 -05:00