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

225 Commits

Author SHA1 Message Date
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