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

270 Commits

Author SHA1 Message Date
Jelmer Vernooij
49839f356f r10513: Reduce some use of pstring. The main reason some parts of the code still
use pstring is next_token() now.
(This used to be commit a5b88bcd42)
2007-10-10 13:38:58 -05:00
Jelmer Vernooij
f801ad3592 r10510: Decrease the amount of data included by includes.h a bit
(This used to be commit 03647e1321)
2007-10-10 13:38:58 -05:00
Jelmer Vernooij
e337caeed1 r10509: Some more sconscript fixes. Now getting to link stage for smbclient
(This used to be commit 6df956edba)
2007-10-10 13:38:58 -05:00
Jelmer Vernooij
f3b412fbd6 r10438: Move portability functions to lib/replace/; replace now simply ensures
that a given set of (working) POSIX functions are available (without
prefixes to their names, etc). See lib/replace/README for a list.

Functions that behave different from their POSIX specification
(such as sys_select, sys_read, etc) have kept the sys_ prefix.
(This used to be commit 29919a7105)
2007-10-10 13:38:45 -05:00
Andrew Bartlett
51cbc188df 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
(This used to be commit 194e8f07c0)
2007-10-10 13:38:39 -05:00
Jelmer Vernooij
9d44a9a351 r10374: Add HAVE_* defines (on command-line or in config.h file) for scons +
some other minor updates
(This used to be commit f142c15de1)
2007-10-10 13:38:33 -05:00
Jelmer Vernooij
6812c73534 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
(This used to be commit 4f0d7f75b9)
2007-10-10 13:38:30 -05:00
Jelmer Vernooij
5b02ee9b9d r10336: Add sconscript for a couple more subsystems.
(This used to be commit 59d4450453)
2007-10-10 13:38:29 -05:00
Jelmer Vernooij
349294d358 r10315: Remove use of fstring and pstring in dynconfig.c
Remove unused includes of dynconfig.h
(This used to be commit 59083b7ba6)
2007-10-10 13:38:17 -05:00
Andrew Bartlett
24186a80eb 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
(This used to be commit 6202267f6e)
2007-10-10 13:34:54 -05:00
Jelmer Vernooij
9f611ffdde 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
(This used to be commit ce0935112b)
2007-10-10 13:31:00 -05:00
Andrew Tridgell
a369f0ecaf r8678: setup for gdb backtrace in 'make test'
(This used to be commit acf8c8fd49)
2007-10-10 13:29:53 -05:00
Andrew Tridgell
2f5f01567b r8643: - make lp_configfile() work again
- get rid of redundeny dyn_CONFIGFILE argument to lp_load()

- fixed provisioning to work with completely pristine install,
  creating an initial smb.conf is none is present

- added lp.set() and lp.reload() to loadparm ejs object interface
(This used to be commit c2691ef712)
2007-10-10 13:29:48 -05:00
Andrew Tridgell
e835621799 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
(This used to be commit a58ea6b385)
2007-10-10 13:29:34 -05:00
Andrew Tridgell
2a90c448bd r7916: - got rid of the in_client global
- make not finding smb.conf a level 1 message, not level 0. Most of our
  tools handle no smb.conf, and those that don't should check for the
  specific parameters they need, or use the defaults
(This used to be commit 8c17b61f8e)
2007-10-10 13:18:49 -05:00
Andrew Tridgell
ee57c76a68 r7704: - fixed open_nbt_connection() to return NULL when the connection failed
- got rid of smbcli_shutdown() and use talloc_free() instead.
(This used to be commit 1011b1bf51)
2007-10-10 13:18:23 -05:00
Andrew Tridgell
af237084ec 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
(This used to be commit 3a3025485b)
2007-10-10 13:18:15 -05:00
Andrew Bartlett
00e2b7c1b4 r7530: Simply calling convention of lp_load().
This always loads all the services, as we now don't have an easy way
to split out smbd.

Andrew Bartlett
(This used to be commit 990e061939)
2007-10-10 13:18:07 -05:00
Andrew Bartlett
2b4791ae73 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
(This used to be commit 50f3c2b3a2)
2007-10-10 13:18:06 -05:00
Tim Potter
6412e8eeae r7482: Rename smbcli_send_tconX() to smbcli_tconX() so as not to get it
confused with an async function.
(This used to be commit 340ad67cad)
2007-10-10 13:17:58 -05:00
Tim Potter
2b7fe67f4d r6933: Add a couple of helper functions for creating nbt names.
(This used to be commit b896daf11c)
2007-10-10 13:16:58 -05:00
Jelmer Vernooij
5b18cf2268 r6795: Make some functions static and remove some unused ones.
(This used to be commit 46509eb899)
2007-10-10 13:16:44 -05:00
Alexander Bokovoy
46727924a0 r6599: Fix formating using 'linux' C style
Fix memory handling for blkid caches which need to be cleared when session is
done.
(This used to be commit c623cc6054)
2007-10-10 13:16:29 -05:00
Alexander Bokovoy
1199f5f561 r6597: Make use of libblkid (part of e2fsprogs) for reporting volume GUID, if possible.
Implement smbclient's 'fsinfo' comand family which allows you to query file
system information in all known levels.
(This used to be commit 660d6e3915)
2007-10-10 13:16:29 -05:00
Andrew Tridgell
d9c15b0f28 r6342: fixed a bad union assumption that caused ACLs to fail on 64 bit machines
Thanks to lars and agruen for finding this
(This used to be commit 2acc069185)
2007-10-10 13:11:33 -05:00
Andrew Bartlett
2eb3d68062 r6028: A MAJOR update to intergrate the new credentails system fully with
GENSEC, and to pull SCHANNEL into GENSEC, by making it less 'special'.

GENSEC now no longer has it's own handling of 'set username' etc,
instead it uses cli_credentials calls.

In order to link the credentails code right though Samba, a lot of
interfaces have changed to remove 'username, domain, password'
arguments, and these have been replaced with a single 'struct
cli_credentials'.

In the session setup code, a new parameter 'workgroup' contains the
client/server current workgroup, which seems unrelated to the
authentication exchange (it was being filled in from the auth info).

This allows in particular kerberos to only call back for passwords
when it actually needs to perform the kinit.

The kerberos code has been modified not to use the SPNEGO provided
'principal name' (in the mechListMIC), but to instead use the name the
host was connected to as.  This better matches Microsoft behaviour,
is more secure and allows better use of standard kerberos functions.

To achieve this, I made changes to our socket code so that the
hostname (before name resolution) is now recorded on the socket.

In schannel, most of the code from librpc/rpc/dcerpc_schannel.c is now
in libcli/auth/schannel.c, and it looks much more like a standard
GENSEC module.  The actual sign/seal code moved to
libcli/auth/schannel_sign.c in a previous commit.

The schannel credentails structure is now merged with the rest of the
credentails, as many of the values (username, workstation, domain)
where already present there.  This makes handling this in a generic
manner much easier, as there is no longer a custom entry-point.

The auth_domain module continues to be developed, but is now just as
functional as auth_winbind.  The changes here are consequential to the
schannel changes.

The only removed function at this point is the RPC-LOGIN test
(simulating the load of a WinXP login), which needs much more work to
clean it up (it contains copies of too much code from all over the
torture suite, and I havn't been able to penetrate its 'structure').

Andrew Bartlett
(This used to be commit 2301a4b38a)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
645711c602 r5941: Commit this patch much earlier than I would normally prefer, but metze needs a working tree...
The main volume of this patch was what I started working on today:
 - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context.
 - Uses sepereate inner loops for some of the DCE/RPC tests

The other and more important part of this patch fixes issues
surrounding the new credentials framwork:

This makes the struct cli_credentials always a talloc() structure,
rather than on the stack.  Parts of the cli_credentials code already
assumed this.

There were other issues, particularly in the DCERPC over SMB handling,
as well as little things that had to be tidied up before test_w2k3.sh
would start to pass.

Andrew Bartlett
(This used to be commit 0453f9d05d)
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
13b0776f60 r5929: Use cli_credentials for the SMB functions as well.
Fix a couple of bugs in the new cli_credentials code
(This used to be commit 4ad481cfe5)
2007-10-10 13:11:09 -05:00
Jelmer Vernooij
05bc2d7b2c r5928: Use cli_credentials in:
- gtk+ (returned by GtkHostBindingDialog as well now)
 - torture/
 - librpc/
 - lib/com/dcom/
(This used to be commit ccefd78233)
2007-10-10 13:11:08 -05:00
Jelmer Vernooij
02075be0bb 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 :-)
(This used to be commit 1d49b57c50)
2007-10-10 13:11:08 -05:00
Andrew Bartlett
df64302213 r5902: A rather large change...
I wanted to add a simple 'workstation' argument to the DCERPC
authenticated binding calls, but this patch kind of grew from there.

With SCHANNEL, the 'workstation' name (the netbios name of the client)
matters, as this is what ties the session between the NETLOGON ops and
the SCHANNEL bind.  This changes a lot of files, and these will again
be changed when jelmer does the credentials work.

I also correct some schannel IDL to distinguish between workstation
names and account names.  The distinction matters for domain trust
accounts.

Issues in handling this (issues with lifetime of talloc pointers)
caused me to change the 'creds_CredentialsState' and 'struct
dcerpc_binding' pointers to always be talloc()ed pointers.

In the schannel DB, we now store both the domain and computername, and
query on both.  This should ensure we fault correctly when the domain
is specified incorrectly in the SCHANNEL bind.

In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out,
where the comment claimed we re-used a connection, but in fact we made
a new connection.

This was achived by breaking apart some of the
dcerpc_secondary_connection() logic.

The addition of workstation handling was also propogated to NTLMSSP
and GENSEC, for completeness.

The RPC-SAMSYNC test has been cleaned up a little, using a loop over
usernames/passwords rather than manually expanded tests.  This will be
expanded further (the code in #if 0 in this patch) to use a newly
created user account for testing.

In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO
server, caused by the removal of [ref] and the assoicated pointer from
the IDL.  This has been re-added, until the underlying pidl issues are
solved.
(This used to be commit 824289dcc2)
2007-10-10 13:11:07 -05:00
Andrew Tridgell
75ddf59ea1 r5308: trimmed back a lot of the old macros from smb_macros.h
(This used to be commit bf43c9bdcf)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
35537c1255 r5302: fixed a compilation problem on solaris caused by the recent include
changes
(This used to be commit e7e015f79b)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
759da3b915 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.
(This used to be commit ec32b22ed5)
2007-10-10 13:09:15 -05:00
Andrew Tridgell
2383787f19 r4891: - added a generic resolve_name() async interface in libcli/resolve/,
which will eventually try all resolution methods setup in smb.conf

 - only resolution backend at the moment is bcast, which does a
   parallel broadcast to all configured network interfaces, and takes
   the first reply that comes in (this nicely demonstrates how to do
   parallel requests using the async APIs)

 - converted all the existing code to use the new resolve_name() api

 - removed all the old nmb code (yay!)
(This used to be commit 239c310f25)
2007-10-10 13:09:03 -05:00
Andrew Tridgell
8451b2658c r4817: ccache was being made ineffective on all the build farm machines
because the version number was being auto-updated and included in all
C files. With this change it is only included where needed.
(This used to be commit 520cff73c6)
2007-10-10 13:08:59 -05:00
Andrew Tridgell
61a3d370b9 r4758: - added async support to the session request code
- added async support to the negprot client code

- removed two unused parameters from smbcli_full_connection() code

- converted smbclient to use smbcli_full_connection() rather than
  reinventing everything itself
(This used to be commit 71cbe28734)
2007-10-10 13:08:50 -05:00
Andrew Tridgell
cc55aef7c1 r4547: - added talloc_new(ctx) macro that is a neater form of the common talloc(ctx, 0) call.
- cleaned up some talloc usage in various files

I'd like to get to the point that we have no calls to talloc(), at
which point we will rename talloc_p() to talloc(), to encourage
everyone to use the typesafe functions.
(This used to be commit e6c81d7c9f)
2007-10-10 13:08:20 -05:00
Andrew Tridgell
e222a342de r4428: use minimum open permissions in the 'acl' command in smbclient, so the user is
not prevented from viewing the acl by other access bits
(This used to be commit 61e71782f5)
2007-10-10 13:07:48 -05:00
Andrew Tridgell
6c4d5917e1 r4365: added command 'eainfo' to smbclient for displaying binary EA contents
(This used to be commit 268edcdb4a)
2007-10-10 13:07:38 -05:00
Andrew Tridgell
8d3d7534f2 r4303: a bit more consistent help on privileges commands in smbclient
(This used to be commit 2d2e9e6373)
2007-10-10 13:07:32 -05:00
Andrew Tridgell
707d180898 r4207: remove "lookupname" and "lookupsid", and instead have a single "lookup" command that
takes a name or sid.

I think in general its better to make smbclient automatically work out the type from
the format (I did the same with the privileges commands)
(This used to be commit bbf482e13a)
2007-10-10 13:07:26 -05:00
Andrew Tridgell
4d545e09c8 r4202: added smbclient commands "addprivileges" and "delprivileges" for
easily adding/removing privileges from users
(This used to be commit 8764909c05)
2007-10-10 13:07:26 -05:00
Andrew Tridgell
ad3ee0a81c r4073: - added a set of lsa helper routines to make lsa lookups that are
related to filesharing. For example, in order to manipulate ACLs
  properly its important to be able to call LookupSids, and to be able
  to lookup what privileges a SID has.

- added 3 new commands to smbclient "lookupname", "lookupsid" and
  "privileges"
(This used to be commit 8780c40f05)
2007-10-10 13:06:23 -05:00
Stefan Metzmacher
9112a632f6 r4063: - change char * -> uint8_t in struct request_buffer
- change smbcli_read/write to take void * for the buffers to match read(2)/write(2)

all this fixes a lot of gcc-4 warnings

metze
(This used to be commit b94f92bc66)
2007-10-10 13:06:21 -05:00
Andrew Tridgell
6e6374cb5b r4055: fixed more places to use type safe allocation macros
(This used to be commit eec698254f)
2007-10-10 13:06:20 -05:00
Andrew Tridgell
e5ce904ddb r4054: got rid of Realloc(), replacing it with the type safe macro realloc_p()
(This used to be commit b0f6e21481)
2007-10-10 13:06:19 -05:00
Andrew Tridgell
58c326809a r4052: fixed a bunch of code to use the type safe _p allocation macros
(This used to be commit 80d15fa340)
2007-10-10 13:06:18 -05:00
Andrew Tridgell
4183b2ac38 r4037: fixed a bunch of "might be uninitialised" warnings after enabling -O1 in my compile
(This used to be commit 0928b1f5b6)
2007-10-10 13:06:16 -05:00
Andrew Tridgell
607e302238 r4013: got rid of a bunch of unused or unmaintained code
- removed the clitar code. It is unmaintained, and a horribly badly done hack

 - removed client.h as it contained mostly unused definitions

 - removed the unused clidfs.c code
(This used to be commit 31a7bddbb3)
2007-10-10 13:06:15 -05:00
Stefan Metzmacher
3308087bae r3971: fix compiler warnings
metze
(This used to be commit 234166606d)
2007-10-10 13:06:09 -05:00
Stefan Metzmacher
13abb52758 r3959: fix compiler warnings
metze
(This used to be commit e28351f710)
2007-10-10 13:06:08 -05:00
Jelmer Vernooij
d95a256d1b r3881: Split up the LIBNDR_GEN subsystem into NDR_* and RPC_NDR_* subsystems.
This reduces the total size of the samba binaries from 119 Mb to 73 Mb.
Next step will be to have the build system obtain some of this information
by itself, so that we don't have to write ~10 lines per interface manually.
(This used to be commit 16d905f6b0)
2007-10-10 13:06:01 -05:00
Andrew Tridgell
012be92f0a r3830: unified the query/set security descriptor code with the rest of the
queryfileinfo/setfileinfo logic, so querying/setting a security
descriptor is treated as just another file query/set operation.

This will allow NTVFS backends to see the query/set security
descriptor operations as RAW_FILEINFO_SEC_DESC and
RAW_SFILEINFO_SEC_DESC operations.
(This used to be commit f68a6b6b91)
2007-10-10 13:05:57 -05:00
Jelmer Vernooij
34ddb33b4b r3744: Support building subsystems as a shared library. Modules don't work yet,
so while this does compile, it does not work yet.
(This used to be commit 3d885562c9)
2007-10-10 13:05:50 -05:00
Jelmer Vernooij
8e16d8a76f 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)
(This used to be commit 64826da834)
2007-10-10 13:05:47 -05:00
Andrew Tridgell
4815480bb6 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
(This used to be commit 5205f598b8)
2007-10-10 13:05:41 -05:00
Jelmer Vernooij
71db46ea66 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
(This used to be commit 7a8244761b)
2007-10-10 13:05:36 -05:00
Andrew Tridgell
6f214cc510 r3494: got rid of include/rewrite.h, and split out the dynconfig.h header
(This used to be commit 558de54ec6)
2007-10-10 13:05:22 -05:00
Andrew Tridgell
34c9263ed0 r3483: IRIX 6.4 now builds
(This used to be commit 5d1a687ce4)
2007-10-10 13:05:20 -05:00
Andrew Tridgell
a99b6219a8 r3481: split out client.h and events.h
(This used to be commit c6f4865744)
2007-10-10 13:05:20 -05:00
Andrew Tridgell
6bd02aa504 r3478: split out some more pieces of includes.h
(This used to be commit 8e9212ecfc)
2007-10-10 13:05:20 -05:00
Andrew Tridgell
3643fb1109 r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h)
(This used to be commit b97e395c81)
2007-10-10 13:05:17 -05:00
Andrew Tridgell
6148deca66 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
(This used to be commit 10188869ef)
2007-10-10 13:05:13 -05:00
Andrew Tridgell
edbfc0f6e7 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
(This used to be commit 7b7477ac42)
2007-10-10 13:05:13 -05:00
Andrew Tridgell
26c6b4c70b r3449: more include file reduction
the ldb part isn't ideal, I will have to think of a better solution
(This used to be commit 6b1f86aea8)
2007-10-10 13:05:13 -05:00
Andrew Tridgell
ead3508ac8 r3447: more include/system/XXX.h include files
(This used to be commit 264ce91810)
2007-10-10 13:05:12 -05:00
Andrew Tridgell
284349482f r3443: the next stage in the include files re-organisation.
I have created the include/system/ directory, which will contain the
wrappers for the system includes for logical subsystems. So far I have
created include/system/kerberos.h and include/system/network.h, which
contain all the system includes for kerberos code and networking code.
These are the included in subsystems that need kerberos or networking
respectively.

Note that this method avoids the mess of #ifdef HAVE_XXX_H in every C
file, instead each C module includes the include/system/XXX.h file for
the logical system support it needs, and the details are kept isolated
in include/system/

This patch also creates a "struct ipv4_addr" which replaces "struct
in_addr" in our code. That avoids every C file needing to import all
the system networking headers.
(This used to be commit 2e25c71853)
2007-10-10 13:05:11 -05:00
Andrew Tridgell
652b8b34f8 r3441: some include file cleanups and general housekeeping
(This used to be commit 73ea8ee6c2)
2007-10-10 13:05:11 -05:00
Andrew Tridgell
90067934cd r3428: switched to using minimal includes for the auto-generated RPC code.
The thing that finally convinced me that minimal includes was worth
pursuing for rpc was a compiler (tcc) that failed to build Samba due
to reaching internal limits of the size of include files. Also the
fact that includes.h.gch was 16MB, which really seems excessive. This
patch brings it back to 12M, which is still too large, but
better. Note that this patch speeds up compile times for both the pch
and non-pch case.

This change also includes the addition iof a "depends()" option in our
IDL files, allowing you to specify that one IDL file depends on
another. This capability was needed for the auto-includes generation.
(This used to be commit b8f5fa8ac8)
2007-10-10 13:05:09 -05:00
Andrew Tridgell
9f1210a243 r3419: moved the libcli/raw structures into libcli/raw/libcliraw.h
and made them private
(This used to be commit 386ac565c4)
2007-10-10 13:05:07 -05:00
Andrew Tridgell
8004eac37f r3327: fixed another warning
we're now down the the last few warnings. Most are enum warnings
caused by unfinished code (unhandled enum levels). If you want to get
rid of those then work on finishing that code.
(This used to be commit b62f7bb971)
2007-10-10 13:04:55 -05:00
Andrew Tridgell
a6ae640313 r3323: more warning reductions
(This used to be commit 5921587ec2)
2007-10-10 13:04:55 -05:00
Andrew Tridgell
9d055846f2 r3278: - rewrote the client side rpc connection code to use lib/socket/
rather than doing everything itself. This greatly simplifies the
  code, although I really don't like the socket_recv() interface (it
  always allocates memory for you, which means an extra memcpy in this
  code)

- fixed several bugs in the socket_ipv4.c code, in particular client
  side code used a non-blocking connect but didn't handle EINPROGRESS,
  so it had no chance of working. Also fixed the error codes, using
  map_nt_error_from_unix()

- cleaned up and expanded map_nt_error_from_unix()

- changed interpret_addr2() to not take a mem_ctx. It makes absolutely
  no sense to allocate a fixed size 4 byte structure like this. Dozens
  of places in the code were also using interpret_addr2() incorrectly
  (precisely because the allocation made no sense)
(This used to be commit 7f2c771b0e)
2007-10-10 13:04:49 -05:00
Andrew Tridgell
38807f046b r2906: fixed a memory leak in the smbclient -L code
(This used to be commit 0181fe06b4)
2007-10-10 12:59:46 -05:00
Andrew Tridgell
b2f1a29e43 r2710: continue with the new style of providing a parent context whenever
possible to a structure creation routine. This makes for much easier
global cleanup.
(This used to be commit e14ee428ec)
2007-10-10 12:59:25 -05:00
Andrew Tridgell
5c94fcab92 r2577: - I recently found out that charaters below 0x3F are guaranteed not to
occur as secondary bytes in any multi-byte character set. This
  allows for a very simple optimisation in strchr_m() and
  strrchr_m(). It might be a good idea to pick this up for Samba3.

- the horrible toktocliplist() is only used in clitar.c, so move it
  there, to prevent anyone else from being tempted to use it.
(This used to be commit 663b7b75dd)
2007-10-10 12:59:07 -05:00
Andrew Tridgell
2f377d5101 r2499: - use more efficient wildcard delete in smbclient
- use "*.*" instead of "*" when connected to ancient servers
(This used to be commit e28f202758)
2007-10-10 12:58:59 -05:00
Andrew Tridgell
992442cbf9 r2456: got rid of some outdated global macros
(This used to be commit ea7eac5e3f)
2007-10-10 12:58:55 -05:00
Andrew Tridgell
f94de51a4e r2433: attrib_string() is now a generally available library function (it will be used by the new RAW-SEARCH test)
(This used to be commit bb6bb2735e)
2007-10-10 12:58:52 -05:00
Andrew Bartlett
92cf946ab5 r2063: Ensure the first argument to a printf() like function (talloc_init()
in this case) is constant.

Andrew Bartlett
(This used to be commit 806ed15e60)
2007-10-10 12:58:23 -05:00
Andrew Tridgell
694ac65faa r2003: got rid of next_token_nr(), which involved some horrible globals
and nasy pointer tricks.

this involved fixing some of the internals of smbclient
(This used to be commit 126fec6169)
2007-10-10 12:58:16 -05:00
Tim Potter
ef7c734976 r1986: Janitor for myself. Merge -r1907:1908 from SAMBA_3_0 branch.
(This used to be commit 99f7feec0a)
2007-10-10 12:58:14 -05:00
Stefan Metzmacher
8115bf6e2c r1957: add cmdline_set_* functions
and let smbclient use the cmdline _* functions

metze
(This used to be commit ffb87ebc33)
2007-10-10 12:58:13 -05:00
Andrew Tridgell
8d6e233f66 r1941: - fixed an allocation error with querying security descriptors remotely
- print the received security_descriptor in the smbclient "acl" command

- make sure we zero the alignment data in nttrans packet sends
(This used to be commit 8925b8b219)
2007-10-10 12:58:12 -05:00
Stefan Metzmacher
927e8242c1 r1913: add --version back
metze
(This used to be commit a1bb734009)
2007-10-10 12:58:11 -05:00
Stefan Metzmacher
bca24a19eb r1911: merge a few popt parameters from 3.0 move some to better places
and deal with users DOMAIN and lp_workgroup() of the local workstation

metze
(This used to be commit 1fc0100e44)
2007-10-10 12:58:10 -05:00
Andrew Tridgell
1129c78083 r1897: added a choose_called_name() function that allows us to more sanely
handle connections using the IP as the server name, while not trying
for NBT name resolution on names like "192" and "192.168.1.2".

also removed the ip address argument to smbcli_socket_connect() as it
isn't used and doesn't really make sense.
(This used to be commit 2ce4028842)
2007-10-10 12:58:09 -05:00
Andrew Bartlett
86d4ec7212 r1730: We cannot dereference c->tree here, as there is not a tree yet.
Andrew Bartlett
(This used to be commit c9b5f335f8)
2007-10-10 12:57:51 -05:00
Stefan Metzmacher
c5fbb6f23c r1654: rename cli_ -> smbcli_
rename CLI_ -> SMBCLI_

metze
(This used to be commit 8441750fd9)
2007-10-10 12:57:47 -05:00
Andrew Tridgell
5ddf678e01 r1578: the first stage of the async client rewrite.
Up to now the client code has had an async API, and operated
asynchronously at the packet level, but was not truly async in that it
assumed that it could always write to the socket and when a partial
packet came in that it could block waiting for the rest of the packet.

This change makes the SMB client library full async, by adding a
separate outgoing packet queue, using non-blocking socket IO and
having a input buffer that can fill asynchonously until the full
packet has arrived.

The main complexity was in dealing with the events structure when
using the CIFS proxy backend. In that case the same events structure
needs to be used in both the client library and the main smbd server,
so that when the client library is waiting for a reply that the main
server keeps processing packets. This required some changes in the
events library code.

Next step is to make the generated rpc client code use these new
capabilities.
(This used to be commit 96bf4da3ed)
2007-10-10 12:57:42 -05:00
Andrew Bartlett
88002b851b r1462: GENSEC Kerberos and SPENGO work:
- Spelling - it's SPNEGO, not SPENGO
 - SMB signing - Krb5 logins are now correctly signed
 - SPNEGO - Changes to always tell GENSEC about incoming packets, empty or not.

Andrew Bartlett
(This used to be commit cea578d6f3)
2007-10-10 12:57:32 -05:00
Jelmer Vernooij
39965d1993 r1034: Couple of small (popt) fixes
(This used to be commit 6fa0baa1c3)
2007-10-10 12:56:31 -05:00
Stefan Metzmacher
770e3307ce r962: convert 'unsigned' and 'unsigned int' to uint_t
metze
(This used to be commit 57151e80eb)
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
fa2e9ec311 r960: convert 'unsigned int' to uint_t in the most places
metze
(This used to be commit 18062d2ed9)
2007-10-10 12:56:23 -05:00
Stefan Metzmacher
45e93c19ef r943: change samba4 to use 'uint8_t' instead of 'unsigned char'
metze
(This used to be commit b5378803fd)
2007-10-10 12:56:21 -05:00
Stefan Metzmacher
f88bf54c7f r889: convert samba4 to use [u]int16_t instead of [u]int16
metze
(This used to be commit af6f1f8a01)
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
f9d8f8843d r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
(This used to be commit 0e5517d937)
2007-10-10 12:56:15 -05:00
Andrew Tridgell
579c13da43 r873: converted samba4 to use real 64 bit integers instead of
structures. This was suggested by metze recently.

I checked on the build farm and all the machines we have support 64
bit ints, and support the LL suffix for 64 bit constants. I suspect
some won't support strtoll() and related functions, so we will
probably need replacements for those.
(This used to be commit 9a9244a1c6)
2007-10-10 12:56:14 -05:00
Stefan Metzmacher
6ac53d211d r866: convert the rest of the binaries to config.mk files
metze
(This used to be commit 0f8c193ac3)
2007-10-10 12:56:13 -05:00
Andrew Tridgell
3672a067be r591: don't need to init non-ref out ptrs (thanks to abartlet for spotting this)
(This used to be commit 3ac0cff837)
2007-10-10 12:51:49 -05:00
Andrew Tridgell
2733f8cf7c r361: allow anonymous browsing
(This used to be commit 845730501e)
2007-10-10 12:51:34 -05:00
Andrew Tridgell
9e323d5db5 r360: use the STYPE_* definitions from srvsvc.idl
(This used to be commit 32707fe3c0)
2007-10-10 12:51:34 -05:00
Andrew Tridgell
fd7252570b r357: added share browsing to smbclient using the SRVSVC MSRPC pipe
(This used to be commit 53ae1ddb8d)
2007-10-10 12:51:34 -05:00
Andrew Tridgell
ac193579e7 r152: a quick airport commit ....
added ldbedit, a _really_ useful command

added ldbadd, ldbdel, ldbsearch and ldbmodify to build

solved lots of timezone issues, we now pass the torture tests with
client and server in different zones

fixed several build issues

I know this breaks the no-LDAP build. Wait till I arrive in San Jose for that
fix.
(This used to be commit af34710d4d)
2007-10-10 12:51:11 -05:00
Andrew Tridgell
7d9763325c r66: fixed a segv when printing an error from a session setup failure. This
was caused by the cli to cli->tree conversion a while ago
(This used to be commit f88f1d3361)
2007-10-10 12:50:41 -05:00
Gerald Carter
381a903d00 r42: importing .cvsignore files
(This used to be commit 11717ae912)
2007-10-10 12:50:40 -05:00
Andrew Tridgell
b087ed4821 r23: get rid of def_finfo
(This used to be commit 25b7ec390a)
2007-10-10 12:50:33 -05:00
Tim Potter
9a6388179b Convert libcli routines to return NTSTATUS instead of BOOL. Again, the
only users are smbclient and smbtorture.
(This used to be commit 54cb508c78)
2004-02-10 11:33:35 +00:00
Tim Potter
4639eb5a58 Convert libcli routines to use cli_tree instead of cli_state. Port
smbtorture to use the new interface.

Part 2 will be to eliminate cli_state from smbtorture as this is now
the only place where it is used.
(This used to be commit db1cc96af6)
2004-02-08 00:51:07 +00:00
Stefan Metzmacher
e06687eb17 merge the version.h autogeneration stuff from 3.0
metze
(This used to be commit 24dc237e10)
2004-01-28 12:47:52 +00:00
Andrew Tridgell
f83f0cb060 fixed some warnings
(This used to be commit 1c2b8a93c5)
2003-11-28 09:05:44 +00:00
Andrew Tridgell
11e9184895 by using a single proto.h we gain another factor of 4 in the speed of
"make proto"
(This used to be commit f6bb118799)
2003-11-23 03:03:27 +00:00
Andrew Tridgell
7fd381376f - a few portability fixes from Jim Myers
- added SMBD_LISTEN_BACKLOG in local.h

- added the beginnings of a ndr/rpc parsing framework for Samba4. It
  currently correctly parses security descriptors for the nttrans
  QUERY_SECDESC call, but I hope it will become a reasonable framework
  that an idl based generator can work to
(This used to be commit 9bf904fc34)
2003-10-30 08:32:26 +00:00
Andrew Tridgell
0becf4d683 thanks to ntfsd and some google searches I worked out what the unknown
fields in level 261 and level 262 of directory search are, plus the
names of the levels

the unknown fields are a 64bit unique file id, and match the 64 bit
number from the internal_information qfileinfo level
(This used to be commit b69f54eb02)
2003-09-02 04:37:33 +00:00
Andrew Tridgell
8e4ab747b0 more fixes from the IRIX compiler (thanks herb!)
(This used to be commit 4cf3839b72)
2003-08-15 18:33:43 +00:00
Herb Lewis
2efe201fa4 client/client.c - cannot initialize struct with non-const values
include/byteorder.h - fix for IRIX compiler - cannot cast an LVALUE
include/smb_interfaces.h - remove empty structure
source/lib/debug.c - void functions cannot return value
libcli/clifile.c - cannot assign *struct to struct
(This used to be commit 9a72476201)
2003-08-14 21:56:26 +00:00
Andrew Tridgell
e08eee4db0 fixed allinfo bug reported by metze
(This used to be commit 0b7e5d6353)
2003-08-14 04:14:49 +00:00
Andrew Tridgell
e063ea70ad use the \\server\share form of tconx to work with servers that don't
cope with the simpler form
(This used to be commit 295cc63fb8)
2003-08-13 02:01:01 +00:00
Andrew Tridgell
ef2e26c91b first public release of samba4 code
(This used to be commit b0510b5428)
2003-08-13 01:53:07 +00:00