1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

20453 Commits

Author SHA1 Message Date
Volker Lendecke
ad97bcf813 r25184: Fix some C++ warnings and an uninitialized variable
(This used to be commit b64df8a3c5)
2007-10-10 12:30:49 -05:00
Stefan Metzmacher
f82eb0fef6 r25179: fix libunwind detection on x86 based hosts
we need -lunwind-x86 not -lunwind-i686

metze
(This used to be commit 2e5f478165)
2007-10-10 12:30:49 -05:00
Stefan Metzmacher
6e4bf4c188 r25177: if configured using --enable-socket-wrapper
allow overwritting the location of the WINBINDD_SOCKET_DIR
via an environment variable

metze
(This used to be commit 93bdd2724c)
2007-10-10 12:30:48 -05:00
Jeremy Allison
bb4773e30f r25173: Use the append_buffer version in a loop.
Jeremy.
(This used to be commit 37cf2c2727)
2007-10-10 12:30:48 -05:00
Jeremy Allison
2548e43164 r25172: Remove commented out code we will never enable.
Jeremy.
(This used to be commit 6032fbc358)
2007-10-10 12:30:48 -05:00
Jeremy Allison
db31df8186 r25171: More pstring removal.
Jeremy.
(This used to be commit 4748d26397)
2007-10-10 12:30:48 -05:00
Jeremy Allison
3aaca8028e r25170: Remove pstring limits from ms_fnmatch and module load.
Jeremy.
(This used to be commit 764574ee05)
2007-10-10 12:30:48 -05:00
Volker Lendecke
5eb34f5d57 r25169: Fix bug 4028
(This used to be commit 1a02226700)
2007-10-10 12:30:48 -05:00
Jeremy Allison
b91b785306 r25167: Fix breakage from mangling rewrite. Use the
new name if unmangling succeeded, not if it
failed. Jerry - please re-test, this should
fix your bug.
Jeremy.
(This used to be commit c215d6e849)
2007-10-10 12:30:47 -05:00
Jeremy Allison
ab9d7bf4f9 r25165: Use talloc_asprintf_append_buffer with an unmodified
string.
Jeremy.
(This used to be commit fe30a523df)
2007-10-10 12:30:47 -05:00
Jeremy Allison
47107b2cde r25164: Add talloc_asprintf_append_buffer() and the docs for it.
Jeremy.
(This used to be commit 2243a73d65)
2007-10-10 12:30:47 -05:00
Jeremy Allison
539635cd94 r25163: Fix wrong ctx passed to talloc_asprintf_append().
Found by Metze's code review (thanks Metze !).
Jeremy.
(This used to be commit a7370eea6b)
2007-10-10 12:30:47 -05:00
Michael Adam
5b00e7c389 r25162: Refactor further: add mapping functions between
REGISTRY_VALUE and struct registry_value formats for
registry values. Lacking better naming, I called them
regval_hilvl_to_lolvl and regval_lolvl_to_hilvl for a
start. The might be useful elsewhere, so might be put
into another place later on.

Michael
(This used to be commit 883fd79061)
2007-10-10 12:30:47 -05:00
James Peach
8b6366b301 r25161: Don't panic if setgroups fails in non-root mode.
(This used to be commit ea226c5ed9)
2007-10-10 12:30:46 -05:00
Michael Adam
f157c9abb7 r25160: Refactor out and slightly clean up canonicalization of the registry value
from smbconf_store_values().

Michael
(This used to be commit 7761f9b3cc)
2007-10-10 12:30:46 -05:00
Stefan Metzmacher
28aa4bff8d r25154: move winbindd code into winbindd/
metze
(This used to be commit 3ac7566ae1)
2007-10-10 12:30:46 -05:00
Stefan Metzmacher
38b140fe70 r25152: fix headers used in wbinfo.c
metze
(This used to be commit 2a794db3c5)
2007-10-10 12:30:46 -05:00
Stefan Metzmacher
b6514d02ec r25150: don't recursivly call call dump_core()
as currently seen in 'make test' localy and in the farm

metze
(This used to be commit f41efe01b5)
2007-10-10 12:30:45 -05:00
Günther Deschner
6005c4e657 r25148: Adapt to coding conventions.
Guenther
(This used to be commit c3b423c52a)
2007-10-10 12:30:45 -05:00
Stefan Metzmacher
b8c5d16258 r25146: rename winbindd_nss.h => winbind_struct_protocol.h
as this header has nothing todo with winbindd nor nss
and it contains the definitions for the struct based
protocol

metze
(This used to be commit e9e03aac22)
2007-10-10 12:30:45 -05:00
Stefan Metzmacher
28d076d20f r25143: rename public functions from winbind_client.h
init_request	=> winbindd_init_request
free_response	=> winbindd_free_response
read_reply	=> winbindd_read_reply

write_sock	=> winbind_write_sock
read_sock	=> winbind_read_sock
close_sock	=> winbind_close_sock(void)

metze
(This used to be commit 8a95d7a7ed)
2007-10-10 12:30:45 -05:00
James Peach
45a2713b47 r25142: Panic if setting the group list fails while switching security
contexts. Patch from Tim Prouty <tim.prouty@isilon.com>.
(This used to be commit a136de663f)
2007-10-10 12:30:45 -05:00
Jeremy Allison
dd16ae2506 r25141: More pstring removal.
Jeremy.
(This used to be commit cfcf7cf03e)
2007-10-10 12:30:45 -05:00
Michael Adam
34991bbd0c r25140: Less red bars to hurt my eyes...
(This used to be commit f935d21200)
2007-10-10 12:30:44 -05:00
Michael Adam
aaa0afaa26 r25139: Avoid code duplication: let regval_ctr_copyvalue() call regval_ctr_addvalue().
This also corrects regval_ctr_copyvalue() in that it cannot create (invalid)
regval containers with dupliacte entries...

Michael
(This used to be commit 2daaaaa835)
2007-10-10 12:30:44 -05:00
Jeremy Allison
eacd314057 r25138: More pstring elimination. Add a TALLOC_CTX parameter
to unix_convert().
Jeremy.
(This used to be commit 39c211a702)
2007-10-10 12:30:44 -05:00
Jeremy Allison
d0de93ca76 r25136: When tallocing a string to uppercase remember the terminating
'\0' in size calculations.
Jeremy.
(This used to be commit 54c658867d)
2007-10-10 12:30:43 -05:00
Günther Deschner
1a292def31 r25135: Remove one END_PROFILE(SMBntcreateX) from call_nt_transact_create() which
appears to be a leftover. Should fix the build with profiling enabled.

Jeremy, please check.

Guenther
(This used to be commit 98f2e10e3f)
2007-10-10 12:30:43 -05:00
Günther Deschner
fa78132ab5 r25134: Fix Bug #4968 and make dns updates work with heimdal as well (again,
gss_import_name() needs to follow the same logic as in the LDAP sasl wrapping
(see -r25133).

Tested with MIT 1.2.7, 1.3.6, 1.4.3, 1.5.1, 1.6.1 and Heimdal 0.7.2, 1.0,
1.0.1.

Guenther
(This used to be commit 913fb138aa)
2007-10-10 12:30:43 -05:00
Günther Deschner
1874c564db r25133: Fix sasl wrapping (for ldap sign&seal).
The gss_import_name() broke as we switched from the internal MIT OID
"gss_nt_krb5_principal" to "GSS_KRB5_NT_PRINCIPAL_NAME" and didn't switch from
passing the krb5_principal (or better: a pointer to that, see MIT's "*HORRIBLE*
bug") to pass the string principal directly.

Jerry, Jeremy, neither I could figure out the need of passing in a
krb5_principal at all nor could I reproduce the crash you were seeing.

I sucessfully tested the code (now importing a string) with MIT 1.2.7, 1.3.6,
1.4.3, 1.5.1, 1.6.1 and Heimdal 0.7.2, 1.0, 1.0.1.

Guenther
(This used to be commit cb2dc715e3)
2007-10-10 12:30:43 -05:00
Stefan Metzmacher
52936b1c86 r25130: make use only of base types which are provided by libreplace
in winbind client and nss/pam stuff

metze
(This used to be commit 2e13e05fa9)
2007-10-10 12:30:43 -05:00
Stefan Metzmacher
85d1b13fbe r25128: _XOPEN_SOURCE_EXTENDED and socklen_t are always provided by libreplace
metze
(This used to be commit b3ee9adf28)
2007-10-10 12:30:42 -05:00
Stefan Metzmacher
c44929cbea r25125: create prototypes for 'bool ' functions
metze
(This used to be commit 5afa66970e)
2007-10-10 12:30:42 -05:00
Jeremy Allison
af3de3fa71 r25121: Remove pstring limits from much of our string handling function.
Still a few left (mainly the substitute ones).
Jeremy.
(This used to be commit 6552e52979)
2007-10-10 12:30:42 -05:00
Jeremy Allison
6716382ec9 r25120: One more warning.
Jeremy.
(This used to be commit 9cc70e3ccf)
2007-10-10 12:30:42 -05:00
Jeremy Allison
ad26e7c4a3 r25119: Fix a couple of warnings.
Jeremy.
(This used to be commit 0e655ac946)
2007-10-10 12:30:42 -05:00
Jeremy Allison
d5c9d87946 r25118: More pstring elimination.
Jeremy.
(This used to be commit 7632f8fb40)
2007-10-10 12:30:41 -05:00
Jeremy Allison
12f61e09d9 r25117: The mega-patch Jerry was waiting for. Remove all pstrings from
the main server code paths. We should now be able to cope with
paths up to PATH_MAX length now.
Final job will be to add the TALLOC_CTX * parameter to
unix_convert to make it explicit (for Volker).
Jeremy.
(This used to be commit 7f0db75fb0)
2007-10-10 12:30:41 -05:00
Jeremy Allison
4754b0ec65 r25116: Fix talloc_asprintf_append to do the right thing with
truncated strings.
Jeremy.
(This used to be commit 93c42fd9b5)
2007-10-10 12:30:41 -05:00
Jeremy Allison
3a9d382164 r25111: Move to talloced pathnames on most code paths.
There are now ony 17 pstrings left in reply.c,
and these will be easy to remove (and I'll be
doing that shortly). Had to fix an interesting
bug in pull_ucs2_base_talloc() when a source
string is not null terminated :-).
Jeremy.
(This used to be commit 0c9a8c4dff)
2007-10-10 12:30:41 -05:00
Günther Deschner
1ef2464451 r25109: Remove obsolete argument from ads_guess_service_principal().
Guenther
(This used to be commit 2dea9464bb)
2007-10-10 12:30:41 -05:00
Günther Deschner
dc58b03517 r25108: Make ifdef labyrinth in sasl code a bit more readable.
Guenther
(This used to be commit f31949ec34)
2007-10-10 12:30:40 -05:00
Simo Sorce
c49699d15b r25107: Fix const warning caused by the way I reformatted this
(This used to be commit 6ce01bf413)
2007-10-10 12:30:40 -05:00
Jeremy Allison
1cc01f2249 r25104: Fix extra lines added by mistake.
Jeremy.
(This used to be commit a28a35f9cd)
2007-10-10 12:30:40 -05:00
Jeremy Allison
327ca9167e r25103: Ensure we don't return unwritten memory (valgrind caught).
Jeremy.
(This used to be commit b3f0d39d11)
2007-10-10 12:30:40 -05:00
Jeremy Allison
351eb37a25 r25102: Rewrite msdfs code to use talloced filenames. Passes make test
and make valgrindtest. Final step will be to change srvstr_get_path()
to return talloced memory in the major codepaths.
Jeremy.
(This used to be commit cf6b6f9c3a)
2007-10-10 12:30:40 -05:00
Gerald Carter
d65ba539a4 r25099: Commit fix for CVE-2007-4138 from 3.0.26 release.
(This used to be commit aa768a4a20)
2007-10-10 12:30:39 -05:00
Michael Adam
e16f8188ea r25092: Add support for storing trusted domain passwords in LDAP for
passdb backend = ldapsam.

Along with reproducing the functionality of the secrets.tdb
code, I have prepared the handling of the previous trust password
(in case we are contacting a dc which does not yet know of a recent
password change). This information has still to be propagated
to the outside, but this requires a change of the api and also
a change of the secrets.tdb code.

Michael
(This used to be commit 6c3c20e6c4)
2007-10-10 12:30:39 -05:00
Michael Adam
3853c7e144 r25091: Start adding support for storing trusted domain passwords in LDAP
(for passdb backen = ldapsam). At a first step, add the hooks,
calling the secrets_ functions.

Michael
(This used to be commit 9c03cdf3a4)
2007-10-10 12:30:39 -05:00
Michael Adam
3395099fa8 r25087: Reformatting: Get rid of an abundance of leading tabs...
(This used to be commit d8676f30d5)
2007-10-10 12:30:39 -05:00
Michael Adam
a3dc218f48 r25086: Fix interdomain trusts (this povides the fix expected in r22709):
Fix winbindd on a Samba DC talking to a trusted domain DC by
making it use the trusted domain password...

Michael

I hope this does not brake any other setup.
(This used to be commit 2322fe5cd7)
2007-10-10 12:30:38 -05:00
Günther Deschner
cd45a258a7 r25080: Once we decrypted the packet but have timing problems (closkew, tkt not yet or
no longer valid) there is no point to bother the keytab routines.

Guenther
(This used to be commit 7e4dcf8e7e)
2007-10-10 12:30:38 -05:00
Stefan Metzmacher
35a616e82c r25074: as all requests in the winbindd child are sync, we can use talloc_tos()
metze
(This used to be commit 6e238fe5b4)
2007-10-10 12:30:38 -05:00
Günther Deschner
2569a25433 r25068: Older samba3 DCs will return DCERPC_FAULT_OP_RNG_ERROR for every opcode on the
LSARPC_DS pipe, continue with no_lsarpc_ds mode here as well to get
domain->initialized set to True. This avoids permanent scanning of Samba3 DCs
in winbindd. Thanks Michael, for pointing this out.

Guenther
(This used to be commit 9b85f7ca43)
2007-10-10 12:30:38 -05:00
Simo Sorce
bd45eab008 r25064: We use BOOL/True/False not bool/true/false
(This used to be commit f624a269bf)
2007-10-10 12:30:38 -05:00
Simo Sorce
ac1642508f r25063: Fix segfault in smbldp_set_creds when we want to use anonymous, the
code was not passing in the "anon" flag correctly and was passing
NULL pointers.
(This used to be commit 6316a9c14d)
2007-10-10 12:30:38 -05:00
Simo Sorce
bb9fbe6221 r25062: Reformat, remove trailing spaces and fit lines into 80 columns
(This used to be commit 1850d1c10f)
2007-10-10 12:30:37 -05:00
Volker Lendecke
bbbac99ecb r25061: Pro-actively shut up Coverity :-)
(This used to be commit f2ce4a803c)
2007-10-10 12:30:37 -05:00
Simo Sorce
d19d3e7126 r25060: Fix formatting, remove trailing spaces and cut lines longer than 80 chars
(This used to be commit 7a4d465890)
2007-10-10 12:30:37 -05:00
Simo Sorce
3f8e1f9ad2 r25059: Apply to 3.2 as well
(This used to be commit 17a7d33b3b)
2007-10-10 12:30:37 -05:00
Volker Lendecke
4ee8b2937d r25055: Add file_id_string_tos
This removes file_id_string_static and file_id_string_static2
(This used to be commit 638c848c9a)
2007-10-10 12:30:36 -05:00
Andrew Bartlett
3428c63aa7 r25049: Set new, more secure defaults for Samba 3.2.
Andrew Bartlett
(This used to be commit 87d39f61b4)
2007-10-10 12:30:36 -05:00
Volker Lendecke
54d3c7f61d r25040: Add "net sam rights"
Not strictly in the SAM, but close enough. This command acts directly on
the local tdb, no running smbd required

This also changes the root-only check to a warning
(This used to be commit 0c5657b5ef)
2007-10-10 12:30:36 -05:00
Volker Lendecke
325b342f31 r25036: Fix a become/unbecome_root() pair
(This used to be commit 9e53f50e94)
2007-10-10 12:30:36 -05:00
Lars Müller
a747e8bdcf r25032: Contact an off site DC if non is available on site.
(This used to be commit 50879e6de5)
2007-10-10 12:30:36 -05:00
Lars Müller
9fa56b9ae9 r25030: ip_srv_nonsite and count_nonsite are initialized in get_kdc_list() in any
case.
(This used to be commit 287604a1c7)
2007-10-10 12:30:36 -05:00
Volker Lendecke
de708c344a r25025: Remove an unused function
(This used to be commit 858f7b7d78)
2007-10-10 12:30:35 -05:00
Volker Lendecke
56a029258f r25024: Fix a whole bunch of Coverity bugs
The callers of get_domain_group_from_sid() with some justification
expected map->gid to be initialized when get_domain_group_from_sid
returned True.
(This used to be commit bc8b74dbfe)
2007-10-10 12:30:35 -05:00
Jeremy Allison
fe6644fb5a r25023: Coverity #455. Not actually a bug, but this clarifies
the code a lot.
Jeremy.
(This used to be commit 5ba12eefbe)
2007-10-10 12:30:35 -05:00
Jeremy Allison
2400758fbe r25022: Fix coverity #395. Resource leak on error.
Jeremy.
(This used to be commit 6a237600b8)
2007-10-10 12:30:35 -05:00
Jeremy Allison
923f14ff37 r25021: Fix coverity #435. Use of -1.
Jeremy.
(This used to be commit f789186086)
2007-10-10 12:30:35 -05:00
Jeremy Allison
5d49b172e0 r25020: Fix coverity #374, possible null deref.
Jeremy.
(This used to be commit 82b3656b4b)
2007-10-10 12:30:34 -05:00
Jeremy Allison
fc213876d5 r25019: Fix coverity bug #105, run #332. Use of uninitialized variable.
Jeremy.
(This used to be commit a58de8cee5)
2007-10-10 12:30:34 -05:00
Jeremy Allison
62e3caf0fe r25011: We don't use mangle_map any more.
Jeremy.
(This used to be commit 2e0999c1df)
2007-10-10 12:30:33 -05:00
Jeremy Allison
132ee3990a r25009: Large patch discussed with Volker. Move unix_convert to a talloc-based
interface. More development will come on top of this. Remove the
"mangled map" parameter.
Jeremy.
(This used to be commit dee8beba7a)
2007-10-10 12:30:32 -05:00
Michael Adam
c5d8fd3772 r25002: Refactor out code duplication created by the previous
unification of r24998.

Michael
(This used to be commit 6026d13253)
2007-10-10 12:30:32 -05:00
Michael Adam
30ee281cae r24999: Use the new regval_compose() function in regval_ctr_addvalue().
Michael
(This used to be commit dab9ffe602)
2007-10-10 12:30:32 -05:00
Michael Adam
cc7bc29757 r24998: Add a function regval_compose() to compose a REGISTRY_VALUE from
input data. Use this function in a first step to refactor
the canonicalization code of smbconf_store_values().

Michael
(This used to be commit f4caa2d7d4)
2007-10-10 12:30:32 -05:00
Michael Adam
628e4d9009 r24996: Eliminate more trailing spaces...
(This used to be commit 1ee1b75113)
2007-10-10 12:30:32 -05:00
Volker Lendecke
8401971a87 r24993: Apply some const
(This used to be commit 613b9fcd18)
2007-10-10 12:30:32 -05:00
Michael Adam
85811b273d r24991: Kill all those lots of trailing whitespaces from secrets.c.
These red bars in vi really hurt my eyes... :-o

Michael
(This used to be commit 2e99e141c3)
2007-10-10 12:30:31 -05:00
Michael Adam
f09b0d72f4 r24990: Kill an incredible amount of trailing whitespaces...
Further reformat get_trust_pw to conform to coding rules.

Michael
(This used to be commit b9e76a479e)
2007-10-10 12:30:31 -05:00
Derrell Lipman
9044d03489 r24981: - Use the formal syntax for calling functions through pointers. I've wanted
to make this change for ages, but now with the issue of "open" requiring it,
  this is the time to just do all of them.

Derrell
(This used to be commit e746aaaf4d)
2007-10-10 12:30:31 -05:00
Stefan Metzmacher
abe7e04244 r24978: move domain_init_recv() near the functions that uses it
metze
(This used to be commit 18e830a935)
2007-10-10 12:30:31 -05:00
Rafal Szczesniak
663b922852 r24977: Ensure negative caching for name2sid, sid2name and rids2names
mappings.

rafal
(This used to be commit 3a9b5eabf9)
2007-10-10 12:30:31 -05:00
Stefan Metzmacher
993d64cde3 r24974: catch SIGINT and SIGQUIT like SIGTERM
metze
(This used to be commit ab15f5c3e7)
2007-10-10 12:30:30 -05:00
Michael Adam
b3fbff6eb5 r24970: Polish some comments and add my (C).
Michael
(This used to be commit aa043bb446)
2007-10-10 12:30:30 -05:00
Simo Sorce
274e35f36e r24969: Fwd port "open" patch
(This used to be commit 113d62682a)
2007-10-10 12:30:30 -05:00
Michael Adam
3edc4c6f66 r24955: Reformat some object lists in Makefile.in to minimize the diff.
(This used to be commit 5d94c3dab2)
2007-10-10 12:30:30 -05:00
Günther Deschner
99cc296968 r24954: Fix the build without krb5.
Guenther
(This used to be commit 9df961914c)
2007-10-10 12:30:30 -05:00
Günther Deschner
be3fdd8b62 r24952: Set the kdc locator env vars. This makes the krb5 locator plugin fully
operational (from within winbindd and outside).

Guenther
(This used to be commit 800645d538)
2007-10-10 12:30:30 -05:00
Volker Lendecke
6de1b0b65b r24951: Warn if "os level" > 255
Thanks to Karolin Seeger <ks@sernet.de>
(This used to be commit 3abf06efc1)
2007-10-10 12:30:29 -05:00
Volker Lendecke
ff0947fbed r24949: Remove some static buffers
(This used to be commit df648d47ff)
2007-10-10 12:30:29 -05:00
Volker Lendecke
faefb22c61 r24943: Some stackframes
(This used to be commit cddb9f11d5)
2007-10-10 12:30:29 -05:00
Günther Deschner
46928878f6 r24920: Reformatting.
Guenther
(This used to be commit 62426a0555)
2007-10-10 12:30:29 -05:00
Volker Lendecke
3bcf187a0d r24903: One more tick in #if 0 code
(This used to be commit e0b4fb55e3)
2007-10-10 12:30:29 -05:00
Volker Lendecke
2800362e3f r24902: DEBUG might use talloc_tos() itself...
(This used to be commit 1b39374a17)
2007-10-10 12:30:28 -05:00
Michael Adam
f9a177772d r24879: Activate the winbindd cache-validation message handler.
Now the winbindd cache can be checked at runtime by
calling "smbcontrol winbindd validate-cache".

For the execution of the validation code, I fork a child
and in the child restore the default SIGCHLD handler in
order for the fork/waitpid mechanism of tdb_validate to work.

Michael
(This used to be commit f379a5c47d)
2007-10-10 12:30:28 -05:00
Michael Adam
60abd094fa r24877: Don't panic in tdb validation code when the fork or waitpid fails.
Return error instead.

Michael
(This used to be commit 9b25355dd6)
2007-10-10 12:30:28 -05:00
Derrell Lipman
c3678b45df r24864: - Correct failure of libsmbclient against a version of Windows found on a NAS
device.  The device resets a NBT connection on port 139 when it receives a
  NetBIOS keepalive request.  That request should be supported when NetBIOS is
  in use; Windows is behaving badly.

  libsmbclient needs a way to determine if a connection is still alive, and
  was using a NetBIOS keepalive request if port 139 was in use (on the
  assumption that it was probably NBT), and getpeername() when port 139 was
  not being used (assuming naked transport).

  This patch simplifies the code by exclusively using getpeername() to check
  whether a connection is still alive.  The NetBIOS keepalive request is
  optional anyway (with preference being given to using TCP mechanisms for the
  same purpose), so this should be both simpler and more reliable.

Derrell
(This used to be commit 1f122352b0)
2007-10-10 12:30:28 -05:00
Rafal Szczesniak
00737da4f4 r24853: Rename function as Jerry asked.
s/net_use_upn_machine_account/net_use_krb_machine_account/

rafal
(This used to be commit 86af9fedad)
2007-10-10 12:30:28 -05:00
Michael Adam
57ac659fb6 r24848: Make tdb_validate() take an open tdb handle instead of a file name.
A new wrapper tdb_validate_open() takes a filename an opens and closes
the tdb before and after calling tdb_validate() respectively.

winbindd_validata_cache_nobackup() now dynamically calls one of
the above functions depending on whether the cache tdb has already
been opened or not.

Michael
(This used to be commit dc0b08e659)
2007-10-10 12:30:27 -05:00
Michael Adam
f02f8563a2 r24847: Change standard failure return code of tdb_validate from "-1" to "1".
(This is more safely used with casts from int to uint8, e.g.)

Michael
(This used to be commit cb3583b392)
2007-10-10 12:30:27 -05:00
Michael Adam
d4603ed339 r24845: Fix a segfault in smbcontrol when called with parameters but no extra args.
Michael
(This used to be commit f1bbf9bc18)
2007-10-10 12:30:27 -05:00
Michael Adam
ac3f2e784f r24843: Add a "validate-cache" control message to winbindd.
So there is a new subcommand "smbcontrol winbindd validate-cache" now.

This change provides the infrastructure:
The function currently returns "true" unconditionally.
The call of a real cache validation function will be incorporated
in subsequent changes.

Michael
(This used to be commit ef92d505c0)
2007-10-10 12:30:27 -05:00
Günther Deschner
51e5001cba r24842: Fix build warning.
Guenther
(This used to be commit 205ef6ab3e)
2007-10-10 12:30:27 -05:00
Günther Deschner
56736616d8 r24841: The locator has no dependencies to ldap libs anymore. Also fix the build.
Guenther
(This used to be commit ce7c816083)
2007-10-10 12:30:27 -05:00
Günther Deschner
1f0835c362 r24838: Now for real: build the locator, if we can.
Guenther
(This used to be commit 28f9b8d98d)
2007-10-10 12:30:26 -05:00
Michael Adam
b202692875 r24836: Initialize some uninitialized variables.
This prevents a segfault when get_kdc_ip_string() is called
with sitename == NULL.

Michael
(This used to be commit 58d31e057b)
2007-10-10 12:30:26 -05:00
Günther Deschner
55b59eb80b r24833: Move locator to nsswitch (does not belong to libads anymore).
Guenther
(This used to be commit af90c6949c)
2007-10-10 12:30:26 -05:00
Günther Deschner
dbdc0fecb6 r24832: In the winbind-locator recursion case, try to pick up the kdc from the
environment.

Guenther
(This used to be commit 7f42fe4e08)
2007-10-10 12:30:26 -05:00
Michael Adam
a4c92698c6 r24830: Add a winbindd cache validation function that does not do
backup and corrupt file handling. (To be used in subsequent
changes.)
(This used to be commit b3dcadbed0)
2007-10-10 12:30:26 -05:00
Michael Adam
e5533200ce r24829: Make use of a variable, that is available... :-)
(This used to be commit 9062665208)
2007-10-10 12:30:26 -05:00
Michael Adam
464227599e r24828: Give smbcontrol an initial talloc stackframe.
(This used to be commit 55020b07b5)
2007-10-10 12:30:25 -05:00
Michael Adam
018f72aa9c r24827: Give smbstatus an initial talloc stackframe.
Rewrite main() so as to exit only at a single point
where the stack frame is freed, too.

Michael
(This used to be commit dbe38995ec)
2007-10-10 12:30:25 -05:00
Volker Lendecke
8843550c28 r24826: Fix two memleaks in idmap_cache.c, bug 4917
Thanks again to Patrick Rynhart for persisting :-)

Simo, please check!
(This used to be commit 0a9171f9ef)
2007-10-10 12:30:25 -05:00
Michael Adam
fe6c338463 r24825: Give testparm an initial talloc stackframe, so it does not complain
it is leaking.
(This used to be commit 705336ee10)
2007-10-10 12:30:25 -05:00
Michael Adam
d051dce7b2 r24824: Create an initial talloc stackframe for the net binary.
(This used to be commit c97600b96f)
2007-10-10 12:30:25 -05:00
Jeremy Allison
dacdde6e5c r24813: Reformat to 80 columns.
Jeremy.
(This used to be commit c6c8f5a897)
2007-10-10 12:30:25 -05:00
Jeremy Allison
3b0422ee01 r24811: Simple reformatting to fit the 80 columns rule.
Jeremy.
(This used to be commit 0cdf046dae)
2007-10-10 12:30:24 -05:00
Volker Lendecke
929e1d9920 r24809: Consolidate the use of temporary talloc contexts.
This adds the two functions talloc_stackframe() and talloc_tos().

 * When a new talloc stackframe is allocated with talloc_stackframe(), then
 * the TALLOC_CTX returned with talloc_tos() is reset to that new
 * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
 * happens: The previous talloc_tos() is restored.
 *
 * This API is designed to be robust in the sense that if someone forgets to
 * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
 * resets the talloc_tos().

The original motivation for this patch was to get rid of the
sid_string_static & friends buffers. Explicitly passing talloc context
everywhere clutters code too much for my taste, so an implicit
talloc_tos() is introduced here. Many of these static buffers are
replaced by a single static pointer.

The intended use would thus be that low-level functions can rather
freely push stuff to talloc_tos, the upper layers clean up by freeing
the stackframe. The more of these stackframes are used and correctly
freed the more exact the memory cleanup happens.

This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and
lp_talloc_ctx (did I forget any?)

So, never do a

tmp_ctx = talloc_init("foo");

anymore, instead, use

tmp_ctx = talloc_stackframe()

:-)

Volker
(This used to be commit 6585ea2cb7)
2007-10-10 12:30:24 -05:00
Jeremy Allison
a646210b2b r24808: Fix the same problem Volker noticed.
For some funny reason us4/gcc seems to fall over the '

Jeremy.
(This used to be commit 229e02d732)
2007-10-10 12:30:23 -05:00
Günther Deschner
020e0aba0a r24807: Add WINBINDD_LOCATOR_KDC_ADDRESS env which will be used for the case when the
locator gets called from within winbindd.

Guenther
(This used to be commit 46dbd6034e)
2007-10-10 12:30:23 -05:00
Günther Deschner
b2a1a4a0fe r24806: Fix the build, sorry...
Guenther
(This used to be commit cd1fccaf8f)
2007-10-10 12:30:23 -05:00
Günther Deschner
3e4c094e61 r24805: When we can build the locator, build it.
Guenther
(This used to be commit 91d10fe159)
2007-10-10 12:30:23 -05:00
Günther Deschner
647abf0a7b r24804: As a temporary workaround, also try to guess the server's principal in the
"not_defined_in_RFC4178@please_ignore" case to make at least LDAP SASL binds
succeed with windows server 2008.

Guenther
(This used to be commit f5b3de4d30)
2007-10-10 12:30:23 -05:00
Volker Lendecke
941a783f1a r24803: For some funny reason us4/gcc seems to fall over the '
(This used to be commit 08e309e955)
2007-10-10 12:30:22 -05:00
Volker Lendecke
69d25c9e3d r24802: Activate new tests
RAW-SAMBA3CASEINSENSITIVE and RAW-SAMBA3POSIXTIMEDLOCK
(This used to be commit 1f396cc237)
2007-10-10 12:30:22 -05:00
Günther Deschner
410cc0e9c7 r24801: When told to ignore the winbind cache also do so while trying to store entries.
Thanks Michael for pointing this out.

Guenther
(This used to be commit c704760444)
2007-10-10 12:30:22 -05:00
Günther Deschner
7650d3bb18 r24799: Prefer IP address to dns name when replying in winbindd dsgetdcname.
Guenther
(This used to be commit e5cc09c72f)
2007-10-10 12:30:22 -05:00
Günther Deschner
b79f9b0870 r24797: Fix logic in dsgetdcname().
Guenther
(This used to be commit aca2d78db1)
2007-10-10 12:30:22 -05:00
Jeremy Allison
d76e724b10 r24791: Fix logic error in timeout of blocking lock processing found by
Ronnie. If a lock timeout expires, we must check we can get the
lock before responding with failure. Volker is writing a torture test.
Jeremy.
(This used to be commit 45380f356b)
2007-10-10 12:30:22 -05:00
Rafal Szczesniak
48853f0bad r24789: Add implementation of machine-authenticated connection to netlogon
pipe used when connecting to win2k and newer domain controllers. The
server may be configured to deny anonymous netlogon connections which
would stop domain join verification step. Still, winnt domains require
such smb sessions not to be authenticated using machine credentials.
Creds employed in smb session cannot have a username in upn form, so
provide the separate function to use machine account.

rafal
(This used to be commit 30d99d8ac3)
2007-10-10 12:30:21 -05:00
Gerald Carter
babab94fb9 r24788: Cleanup some linking msgs and remove references to libmsrpc
in SAMBA_3_2_0
(This used to be commit ba05dc013f)
2007-10-10 12:30:21 -05:00
Günther Deschner
8499943338 r24786: Fix another build warning.
Guenther
(This used to be commit 29a56dcc78)
2007-10-10 12:30:21 -05:00
Günther Deschner
46fad0ca27 r24785: Put checks in parentheses.
Guenther
(This used to be commit d8197aca5a)
2007-10-10 12:30:21 -05:00
Michael Adam
d86c441b46 r24784: Initialize uninitalized data to prevent segfaults.
Thanks to Volker for the hint!

Michael
(This used to be commit 3b7ed3ea88)
2007-10-10 12:30:21 -05:00
Günther Deschner
6824731cb0 r24783: Remove unused off_t type.
Guenther
(This used to be commit 85c816c27f)
2007-10-10 12:30:21 -05:00
Volker Lendecke
1a13b09894 r24782: Fix C++ warnings
(This used to be commit f7e8df81ef)
2007-10-10 12:30:20 -05:00
Günther Deschner
24fc1d6dd5 r24781: Fix build warning.
Guenther
(This used to be commit 71307c371f)
2007-10-10 12:30:20 -05:00
Günther Deschner
53d41f3b1b r24778: Make sure krb5 locator requests go to a separate locator winbind child.
Guenther
(This used to be commit fb9228b8d1)
2007-10-10 12:30:20 -05:00
Günther Deschner
4429a01c83 r24776: Remove accidentially commited flag checks.
Guenther
(This used to be commit 1efc5009a4)
2007-10-10 12:30:20 -05:00
Volker Lendecke
a116d7c7d9 r24773: Fix a ctdb connection lockup
The lockup could happen when packet_read_sync() gets two packets in a row, the
first one being an async message, and the second one being the response to a
ctdb request.

Also add some debug msg to ctdb_conn.c, and cut off the "locking key" messages
to only dump 20 hex chars at debug level 10. >10 will dump everything.
(This used to be commit 0a55880a24)
2007-10-10 12:30:20 -05:00
Rafal Szczesniak
a0a32cf5d5 r24771: Use infolevel 25 to set the machine account's password (just like winxp).
This correctly updates pwdLastSet field on win2k3 server.

rafal
(This used to be commit dd6d44c166)
2007-10-10 12:30:19 -05:00
Günther Deschner
60fb367fd9 r24769: Merge error handling for locator plugin.
Guenther
(This used to be commit b83626676c)
2007-10-10 12:30:19 -05:00
Jeremy Allison
e9cea3e2d8 r24764: Fix second TALLOC_SIZE definition. Still watching the
build farm to see I didn't stuff this up...
Jeremy.
(This used to be commit 4ca43172d9)
2007-10-10 12:30:18 -05:00
Jeremy Allison
d17f87e283 r24762: Fix the build, missed TALLOC_SIZE -> talloc_named_const.
Jeremy.
(This used to be commit e2d924248e)
2007-10-10 12:30:18 -05:00
Jeremy Allison
7b24eb65a0 r24759: Comment out the _nonnull calls for 3.2.x, as agreed with tridge.
Leaving the commented out code for now, in case I need to re-test
some stuff.
Jeremy
(This used to be commit 343be04643)
2007-10-10 12:30:18 -05:00
Günther Deschner
6227abc043 r24752: Make sure to return properly when the locator is called from within winbindd.
Guenther
(This used to be commit 6cf7187e88)
2007-10-10 12:30:18 -05:00
Michael Adam
d68a5c2718 r24750: Fix one more caller of name_resolve_bcast().
Michael
(This used to be commit 757b5c1bd7)
2007-10-10 12:30:18 -05:00
Günther Deschner
52cd23c92a r24749: Increase debuglevel.
Guenther
(This used to be commit d82c1638b8)
2007-10-10 12:30:18 -05:00
Günther Deschner
49e92d0d56 r24748: Remove all dependencies to samba internals and convert the krb5 locator plugin
into a tiny winbindd DsGetDcName client. This still does not solve the case of
using the locator from within winbindd itself but at least gencache.tdb and
others are no longer corrupted.

Guenther
(This used to be commit 908e7963b8)
2007-10-10 12:30:17 -05:00
Günther Deschner
21dd4aa82d r24747: Add WINBINDD_DSGETDCNAME call.
Guenther
(This used to be commit 429496a4cc)
2007-10-10 12:30:17 -05:00
Günther Deschner
a090092cd2 r24746: As the winbindd pipe is officially broken since a while: split out request
specfic and generic flags in a winbindd_request.

It turns out that the WBFLAG_RECURSE flag is the only non-PAM specific flag we
put into the "flags" field of a winbind request anyway. Now each request
command can use the entire space of the "flags" field.

Guenther
(This used to be commit 18b29763d1)
2007-10-10 12:30:17 -05:00
Gerald Carter
51514b5d63 r24745: Merge Simo's shared lib build fix from svn r22842 that was lost
somehow.  Don't include the PIE_FLAGS when building shared libs.
(This used to be commit 22f2f1e033)
2007-10-10 12:30:17 -05:00
Volker Lendecke
4b6713e7cc r24744: Increase length by what we got from recv, not from ioctl
(This used to be commit 23c8f4f74b)
2007-10-10 12:30:17 -05:00
Günther Deschner
068d95cde1 r24743: Fix build warning.
Guenther
(This used to be commit 579fb55b75)
2007-10-10 12:30:17 -05:00
Günther Deschner
84bce05e71 r24742: Add experimental DsGetDcName() call (will be used by krb5 locator for fine
grained KDC DNS queries).

Guenther
(This used to be commit 3263cd680f)
2007-10-10 12:30:16 -05:00
Günther Deschner
c087807ee4 r24740: Fix the build.
Guenther
(This used to be commit a30549bbf4)
2007-10-10 12:30:16 -05:00
Günther Deschner
22cf5a3f80 r24739: With resolve_ads() allow to query for PDCs as well.
Also add dns query functions to find GCs and DCs by GUID.

Guenther
(This used to be commit cc469157f6)
2007-10-10 12:30:16 -05:00
Michael Adam
c7489a5d96 r24738: Fix one more use of pwrite in tdb code in the spirit of r23972 and r23977.
Michael
(This used to be commit a3506f291a)
2007-10-10 12:30:16 -05:00
Günther Deschner
1c72c4c360 r24737: Remove older TODO: Convert internal_resolve_name() and friends to NTSTATUS.
Guenther
(This used to be commit 8300aac494)
2007-10-10 12:30:16 -05:00
Günther Deschner
c790f6437f r24734: Move nss_err_str() to a more public place.
Guenther
(This used to be commit f62292c5a1)
2007-10-10 12:30:16 -05:00
Günther Deschner
2af9637925 r24733: Add support for storing DATA_BLOBs in gencache.tdb (including torturetest).
Mimir, please have a look. DATA_BLOBs will now just show up as "DATA_BLOB"
values with "net cache list".

Guenther
(This used to be commit b8ad546d04)
2007-10-10 12:30:15 -05:00
Gerald Carter
40102ad546 r24722: Squashed commit of the following:
commit fb52f971986dd298abbcd9745ddf702820ce0184
Author: Gerald Carter <coffeedude@plainjoe.org>
Date:   Mon Aug 27 13:50:26 2007 -0500

    Check correct return type for pam_winbind_request_log() wnibind_upn_to_username

    which is an int and not NSS_STATUS.

commit 7382edf6fc0fe555df89d5b2a94d12b35049b279
Author: Gerald Carter <coffeedude@plainjoe.org>
Date:   Mon Aug 27 13:30:26 2007 -0500

    Allow wbinfo -n to convert a UPN to a SID

commit 8266c0fe1ccf2141e5a983f3213356419e626dda
Author: Gerald Carter <coffeedude@plainjoe.org>
Date:   Fri Aug 3 09:53:16 2007 -0500

    Merge some of Guenther UPN work for pam_winbind.c (check the winbind separator

    and better pam logging when converting a upn to a username).

commit 15156c17bc81dbcadf32757015c4e5158823bf3f
Author: Gerald Carter <coffeedude@plainjoe.org>
Date:   Fri Aug 3 08:52:50 2007 -0500

    Include Universal groups from the cached PAC/SamLogon info when

    generating the list of domain group SIDs for a user's token.

commit 979053c0307b051954261d539445102c55f309c7
Author: Gerald Carter <coffeedude@plainjoe.org>
Date:   Thu Aug 2 17:35:41 2007 -0500

    merge upnlogon patch from my tree
(This used to be commit 98fb5bcd57)
2007-10-10 12:30:15 -05:00
Günther Deschner
a375d368df r24714: Fix confusing indent.
Guenther
(This used to be commit 6a9af88a2d)
2007-10-10 12:30:15 -05:00
Günther Deschner
7d7b3a9040 r24713: Fix obvious error in enum_dom_groups. We were returning NT_STATUS_OK when the realloc failed.
Guenther
(This used to be commit 750b52cb47)
2007-10-10 12:30:15 -05:00
Günther Deschner
a380f2ce6a r24711: Remove unused talloc context from query_user_list rpc.
Guenther
(This used to be commit 5187157607)
2007-10-10 12:30:15 -05:00
Volker Lendecke
b578db69e9 r24702: Remove the old API pointers
(This used to be commit 17df313db4)
2007-10-10 12:30:14 -05:00
Volker Lendecke
5b9ecb5ae3 r24701: Fix the swat build
Swat has not been built by default for a while, so I did not notice that
the _ macro is actually used. Re-add the lang_msg_rotate function, this
time only to swat so that this is the only binary that has to take the
16k penalty.
(This used to be commit 191e1ef840)
2007-10-10 12:30:14 -05:00
Volker Lendecke
3aed02989f r24699: Actually write 24 zeros instead of zero 24's...
Jeremy, please check ;-)
(This used to be commit 85b64bde7d)
2007-10-10 12:30:14 -05:00
Volker Lendecke
7bd8ad3c92 r24661: Fix some obvious diffs between 3_2 and 3_2_0
Jeremy, there are two remaining diffs in sesssetup.c which I don't really
know which one is right. Can you take a look?

Thanks,

Volker
(This used to be commit d82f354487)
2007-10-10 12:30:13 -05:00
Volker Lendecke
5993ddf240 r24659: Some formatting changes helping to minimize the 3_2_0 diff
(This used to be commit c5caea43af)
2007-10-10 12:30:13 -05:00
Günther Deschner
d61c180e49 r24654: Adapt to coding conventions.
Guenther
(This used to be commit a669ac2bc4)
2007-10-10 12:30:13 -05:00
Volker Lendecke
361938d5b2 r24649: Attempt to fix bug 4917. Simo, please check!
Thanks Patrick Rynhart for reporting this.
(This used to be commit b7c0404893)
2007-10-10 12:30:13 -05:00
Jeremy Allison
f1041f98ce r24639: Add parameter "directory name cache size" - parameterize
use of directory name cache, 100 by default. Will be needed
to turn this off for *BSD systems.
Jeremy.
(This used to be commit bea8e9840f)
2007-10-10 12:30:13 -05:00
Jeremy Allison
a689f6082b r24638: Remove redundent setting of vuid.
Jeremy
(This used to be commit fd682c3f39)
2007-10-10 12:30:12 -05:00
Michael Adam
46f199961f r24637: In order for "net rpc registry" to be able to write to
Samba's own registry, the access mask for opening the
registry for the write operations needs to be
SEC_RIGHTS_MAXIMUM_ALLOWED instead of REG_WRITE: we can
not open e.g. HKLM read write explicitly, since we can
not write to this virtual part of the registry, only
to the subkeys like 'HKLM\Software\Samba\smbconf' that
are stored on disk.

Note that MAXIMUM_ALLOWED is also what windows' regedit
passed to the open calls.

Michael
(This used to be commit 57c30f7319)
2007-10-10 12:30:12 -05:00
Michael Adam
85d0c15da4 r24636: Raise one debug level, since the callers (that want to do so)
issue a level 0 debug message.

Michael
(This used to be commit c0022ff927)
2007-10-10 12:30:12 -05:00
Günther Deschner
7a30cb15da r24632: Fix build warnings.
Guenther
(This used to be commit e9178af01d)
2007-10-10 12:30:12 -05:00
Michael Adam
92ec897627 r24630: Store Samba configuratin options only under the default name, not as aliases.
This prevents creation of problematic configurations from registry editors
like regedit or "net rpc registry".

I will refactor the code to be somewhat more concise,
but I wanted to have this in the tree, now I got it working... :-)

Michael
(This used to be commit 4424a03032)
2007-10-10 12:30:12 -05:00
Michael Adam
a718a93d70 r24629: Make read_sock return the total number of bytes read instead
of the number of bytes read in the last of possibly several
read calls.

This was noted by Metze.

Michael
(This used to be commit 0193a49223)
2007-10-10 12:30:11 -05:00
Stefan Metzmacher
3b29c9cbed r24627: merge from SAMBA_4_0:
as TALLOC_ABORT() is defined to abort() by default
wrap it into a function so that the function name
in the backtrace shows what happens.

metze
(This used to be commit ddbe971030)
2007-10-10 12:30:11 -05:00
Stefan Metzmacher
e24b67fdd5 r24625: add '-D' option to winbindd
TODO: don't allow '-i -D' and '-D -i' on all
      server binaries in the SAMBA_3_2 branch!
      The &server_mode patch makes this difficult to check...

metze
(This used to be commit 102bb0fc17)
2007-10-10 12:30:11 -05:00
Stefan Metzmacher
8dd00920ef r24621: - deferr calling build_options();exit(0);
- use poptPrintUsage() to give the user more info

metze
(This used to be commit a95d9d1ef9)
2007-10-10 12:30:11 -05:00
Stefan Metzmacher
faab8dba02 r24618: move printing out the version string and exit()
into the popt _POST processing.

Now 'smbd -V --bla' complains about an unknown option

metze
(This used to be commit c115de4bea)
2007-10-10 12:30:11 -05:00
Michael Adam
aa1c863063 r24616: In set_boolean(), only pass the result back to the caller
if parsing of the boolean string was successful.
Also, initialize the local result variable
(although not strictly necessary anymore, now.)
(This used to be commit bf0daa74fa)
2007-10-10 12:30:10 -05:00
Günther Deschner
d94d58a46f r24615: Say for which domain the getdcname request failed.
Guenther
(This used to be commit 1ce1958f7a)
2007-10-10 12:30:10 -05:00
Michael Adam
f71a4fa3af r24610: Add a debug message that the workaround has been activated...
(This used to be commit a12f3bf6e9)
2007-10-10 12:30:10 -05:00
Michael Adam
1523103164 r24609: Fix the fix of r23668 for win2k giving one zero byte
instead of a 2-byte zero character. I can't recall what
rode me when I put that "2" there. But now I think I
have got it right... :-)

Michael
(This used to be commit fa010bef11)
2007-10-10 12:30:10 -05:00
Stefan Metzmacher
e273187811 r24605: remove some stuff samba3 doesn't need any more
metze
(This used to be commit 5514e8487f)
2007-10-10 12:30:10 -05:00
Simo Sorce
281931ea77 r24603: In case of error we need to free prefix_cache otherwise on re-init the first
statement will return positively but prefix_cache_hashes would be NULL
(This used to be commit fdc20894a0)
2007-10-10 12:30:10 -05:00
Michael Adam
b9a7a2b966 r24602: Add function lp_string_is_valid_boolean() to check if a string
contains a correct representation of a boolean value (in the
understanding of loadparm.c).

Make set_boolean() catch passing NULL for the boolean target.

Michael
(This used to be commit d13eaa60f5)
2007-10-10 12:30:09 -05:00
Lars Müller
e88a6d3438 r24601: Fix if statements where we still expected cli_connect() to return BOOL.
(This used to be commit 12cb06d6ad)
2007-10-10 12:30:09 -05:00
Stefan Metzmacher
2e498b48bb r24599: patch from Karolin Seeger <ks@sernet.de>:
smbd, nmbd and winbindd can be started with invalid options currently.
The first patch attached would be a possible solution.
It contains an exit if an invalid option has been used. The main problem
is, that existing setups with wrong options or missing arguments in start
scripts will break (which is the right behaviour from my point of view).

metze
(This used to be commit 8532e3182a)
2007-10-10 12:30:09 -05:00
Stefan Metzmacher
96567fa3ea r24597: - talloc request structure for the samba3 server bindings
and make that the primary context for the request
  which the implementations can also use.
- go via functions pointers in the ndr_interface_table
  instead of calling functions directly.

metze
(This used to be commit 5c4d998300)
2007-10-10 12:30:08 -05:00
Volker Lendecke
a9184f49d3 r24595: Fix Coverity ID 393
In this error case we would have used "start" not having it initialized
(This used to be commit 751834fff9)
2007-10-10 12:30:08 -05:00
Stefan Metzmacher
18a48df488 r24594: pass down the ndr_interface_table in the samba3 client bindings
instead of the pull and push functions

metze
(This used to be commit 5e3d4df9bc)
2007-10-10 12:30:08 -05:00
Jeremy Allison
644b43d993 r24590: Reformatting to coding standards. Added my (C) in places it already should
have been :-).
Jeremy.
(This used to be commit 41611a22ed)
2007-10-10 12:30:08 -05:00
Jeremy Allison
57e2718e09 r24589: Refactor our vuid code so that we keep the same
vuid that was allocated whilst the connection is
being constructed and after the connection has been set up.
This is what Windows does and at least one client
(and HP printer) depends on this behaviour. As it
depends on the req struct not yet ported to SAMBA_3_2_0
(Volker, hint hint.... :-) I am not yet adding this
to that branch, but will investigate that tomorrow.
Jeremy.
(This used to be commit a54f2805df)
2007-10-10 12:30:08 -05:00
Günther Deschner
b0b080799c r24584: Merge all pam post-processing code (in particular all extra_data code) into
append_data().

Guenther
(This used to be commit 8c56ee2c58)
2007-10-10 12:30:07 -05:00
Günther Deschner
cf131be215 r24583: Make sure we don't accept invalid request options.
Thanks to Michael for his bit-magic.

Guenther
(This used to be commit 8a493cce98)
2007-10-10 12:30:07 -05:00
Günther Deschner
b2ff8a2663 r24579: Merge error reporting to the end of winbindd_pam_auth().
Guenther
(This used to be commit d5bd8b1d61)
2007-10-10 12:30:07 -05:00
Günther Deschner
42bb05074a r24578: Fix build warning.
Guenther
(This used to be commit 27ecb0df79)
2007-10-10 12:30:07 -05:00
Günther Deschner
18e6f9c6aa r24573: Fix build without LDAP. Thanks Volker for pointing this out.
Guenther
(This used to be commit 1bae53e39f)
2007-10-10 12:30:07 -05:00
Michael Adam
987d7010f8 r24572: Allow for functions map_parameter_canonical() and is_synonym_of() to
be called with inverse == NULL.

Add a new function lp_parameter_is_canonical() to check whether a
parameter name is the canonical name (as apposed to an alias).

Michael
(This used to be commit 07dc0fecf5)
2007-10-10 12:30:07 -05:00
Volker Lendecke
8bab4bdc5d r24571: Only look at errno if the close call actually failed
Patch from Ofir Azoulay <Ofir.Azoulay@expand.com> -- thanks
(This used to be commit 888e657d75)
2007-10-10 12:30:06 -05:00
Stefan Metzmacher
8fb2e83733 r24564: regenerate after pidl changes...
metze
(This used to be commit ec8858c374)
2007-10-10 12:30:05 -05:00
Stefan Metzmacher
8da26d3f96 r24561: merge from SAMBA_4_0:
rename some DCERPC_ prefixes into NDR_

metze
(This used to be commit 8f07b8ab65)
2007-10-10 12:30:03 -05:00
Stefan Metzmacher
2f3511c56e r24558: merge from SAMBA_4_0:
rename 'dcerpc_table_' -> 'ndr_table_'

metze
(This used to be commit 4e5908cd59)
2007-10-10 12:29:57 -05:00
Stefan Metzmacher
c2628e19a7 r24552: merge from SAMBA_4_0:
rename dcerpc_interface_table -> ndr_interface_table
rename dcerpc_interface_list  -> ndr_interface_list

and move them to libndr.h

metze
(This used to be commit f57d23d0f1)
2007-10-10 12:29:56 -05:00
Volker Lendecke
8713bb2db7 r24550: Attempt to fix the non-LDAP build
For example host "bigboy" doesn't have it.

Günther, please fix it properly and merge to 3_2_0

Thanks,

Volker
(This used to be commit 0d29426741)
2007-10-10 12:29:56 -05:00
Volker Lendecke
f5ab9ddd76 r24549: Fix unix_convert to return the already converted part
This API will change anyway when moving away from pstrings.

It took so long to fix, because that rename bug I just fixed gave make
test failures that had nothing to do with this one.

I have samba4 tests for both bugs, will check them in when the build
farm has caught up
(This used to be commit d4f442ed9b)
2007-10-10 12:29:56 -05:00
Volker Lendecke
2efabbbf4b r24548: Fix the case-changing renames
This was broken when I changed reply_mv to wrap in a open_file_ntcreate
call, unix_convert on the destination was called twice
(This used to be commit fddc9db911)
2007-10-10 12:29:56 -05:00
Volker Lendecke
06dd8d28ae r24547: Fix #4897, patch from David S. Collier-Brown <davecb@spamcop.net> -- Thanks!
(This used to be commit 4a90264d17)
2007-10-10 12:29:56 -05:00
Derrell Lipman
a2c3e56a49 r24543: Apply missing portion of correction for bug 4750
(This used to be commit 5a83c306bb)
2007-10-10 12:29:55 -05:00
Stefan Metzmacher
24c594d0b3 r24541: merge from SAMBA_4_0:
rename struct dcerpc_endpoint_list/struct dcerpc_authservice_list
into ndr_interface_string_array and move it to libndr.h

metze
(This used to be commit 9fec0d6c2c)
2007-10-10 12:29:55 -05:00
Stefan Metzmacher
68821746d8 r24538: merge from SAMBA_4_0:
rename struct dcerpc_interface_call -> struct ndr_interface_call
and move it to librpc/ndr/libndr.h

metze
(This used to be commit 24e096b365)
2007-10-10 12:29:55 -05:00
Stefan Metzmacher
b018c9b9a2 r24537: regenerate after pidl fixes
metze
(This used to be commit e827c7311c)
2007-10-10 12:29:54 -05:00
Stefan Metzmacher
5da47f8518 r24533: merge from SAMBA_4_0:
rename dcerpc_syntax_id -> ndr_syntax_id

metze
(This used to be commit 7facd9bf3f)
2007-10-10 12:29:54 -05:00
Michael Adam
c56874d112 r24527: Add a function lp_canonicalize_parameter_with_value that turns
a parameter and value into the canonical paramter with the value
inverted if it was in invers boolean synonym.

Make net conf use this function when storing parameters.

Michael
(This used to be commit 3b762ab183)
2007-10-10 12:29:54 -05:00
Michael Adam
bb76f3f98e r24526: Refactor determiniation of the index of the canonical form of a
parameter given in string representation into a function of its
own (map_parameter_canonical).

Michael
(This used to be commit 0dfb5eee25)
2007-10-10 12:29:54 -05:00
Michael Adam
7190e7515b r24525: Add output of synonym information to show_parameter_list().
Also simplify lp_canonicalize_parameter by making use of
the new function "is_synonym_of".

Michael

Note: If anything depends on the exact former output format of
show_parameter list, I would trigger the output of synonym information
by a boolean verbose switch (that could be passed to testparm
via the "-v" command line switch).
(This used to be commit fd2dbae825)
2007-10-10 12:29:53 -05:00
Michael Adam
b2455bb8d2 r24519: Refactor printing of one parameter into a helper function of its own.
(This used to be commit 70dfe5d098)
2007-10-10 12:29:53 -05:00
Michael Adam
8b0b1408a0 r24513: Reformatting: eliminate trailing spaces, overly long lines
and adjust some formattings to standard.

Michael
(This used to be commit 00432bcd69)
2007-10-10 12:29:53 -05:00
Volker Lendecke
f65041cbf1 r24512: Fix RAW-NOTIFY
With the inbuf consistency checks we have to more correctly fake the
inbuf
(This used to be commit 2b8ecda30f)
2007-10-10 12:29:53 -05:00
Michael Adam
ed4b40e9cb r24510: Fix logic. Thanks to Volker for the hint!
Michael
(This used to be commit ce1d7ad1ac)
2007-10-10 12:29:53 -05:00
Jeremy Allison
891fa216ea r24501: Added bcc test for reply_tcon & removed Vl's comment :-).
Jeremy.
(This used to be commit 9d9ed41f21)
2007-10-10 12:29:53 -05:00
Jeremy Allison
a662a62e5a r24500: Add check that bcc is correct in an incoming packet.
Jeremy.
(This used to be commit 267a0ac48d)
2007-10-10 12:29:52 -05:00
Jeremy Allison
077d5d2e36 r24498: More extra code into a function, reply_openerror.
Jeremy.
(This used to be commit 43ddfb8c91)
2007-10-10 12:29:52 -05:00
Volker Lendecke
bcc7bdcfe3 r24497: Revert r24485 -- this needs more thought
(This used to be commit 01f701ba1e)
2007-10-10 12:29:52 -05:00
Michael Adam
53f5c4adfb r24496: Add initial synonym handling to "net conf":
When storing parameters in the smbconf portion of the registry,
up to now, synonyms could be misused to store a parameter twice.
Now this is prevented by canonicalizing the paramter name first.

Also, the value for a boolean parameter checked for validity
before storing the bool in registry.

(The canonicalization should finally go into the registry smbconf
code to also prevent e.g. "regedit" or "net rpc registry" from
storing synonyms. - This is in the making.)

Michael
(This used to be commit 95447dde86)
2007-10-10 12:29:52 -05:00
Michael Adam
bf374d3d3d r24495: Add a function lp_canonicalize_parameter: It takes a name of a parameter
and produces the "canonical" (or main) name of the parameter (the one
synonym that does not have the flag FLAG_HIDE). The function also sets
a flag as to whether the synonym is a reverse boolean synonym.

Add some functions for the handling of string representations of boolean
values: return the canonical string representation of a bool, invert
a bool given as a string, canonicalize a bool given as a string.

Michael
(This used to be commit 113ac07199)
2007-10-10 12:29:52 -05:00
Volker Lendecke
93fc3a0248 r24485: Even in the failure case unix_convert must pass the already converted
part of the string to the caller.
(This used to be commit 301ae3d68b)
2007-10-10 12:29:51 -05:00
Jeremy Allison
622abf53f9 r24476: Fix the mappings in reply_opeXXX calls. Now to test renames.
Jeremy.
(This used to be commit 74d10b09a6)
2007-10-10 12:29:51 -05:00
Jeremy Allison
522418ce16 r24475: Fix the error mapping for SMB_POSIX_PATH_OPEN.
Jeremy.
(This used to be commit 6dac315ba1)
2007-10-10 12:29:51 -05:00
Jeremy Allison
606f10945f r24474: Map error value NT_STATUS_OBJECT_NAME_COLLISION
to ERRDOS, ERRfilexists for NTCreateX and NTTransCreate.
Jeremy.
(This used to be commit 5b2316d173)
2007-10-10 12:29:51 -05:00
Jeremy Allison
fd9c413786 r24470: Start fixing up the mapping of OBJECT_NAME_COLLISION
to DOS error ERRDOS, ERRfilexists on open calls.
Jeremy.
(This used to be commit 4674486450)
2007-10-10 12:29:50 -05:00
Jeremy Allison
ed70bc0d8e r24468: Don't forget the +4 for length :-).
Jeremy.
(This used to be commit 4d01e0b744)
2007-10-10 12:29:50 -05:00
Jeremy Allison
a1f593cd73 r24467: Do range checking on incoming smb request.
Jeremy.
(This used to be commit dbd58dd647)
2007-10-10 12:29:50 -05:00
Derrell Lipman
415b7463a3 r24466: - Sort ACEs according to http://support.microsoft.com/kb/269175 so that
Windows Explorer doesn't complain about the order (and so that they get
  interpreted properly).

Derrell
(This used to be commit 8f371e2ea9)
2007-10-10 12:29:50 -05:00
Jeremy Allison
3dd3c4cd01 r24464: Now Volker removed the readbmpx we don't need cached errors any more.
Jeremy.
(This used to be commit 9256ec0a20)
2007-10-10 12:29:50 -05:00
Derrell Lipman
e60c0a5bff r24462: - Removing all ACEs was causing removal of the DACL entirely. Win2000 ignored
the request, presumably due to the PROTECTED flag not being set.  Setting
  that flag (in make_sec_desc()) has much wider implications than just to
  libsmbclient, so instead of modifying that, we'll remove security
  descriptors by setting the number of ACEs to zero.  At some point, we might
  want to look into whether we should actually be setting the PROTECTED flag
  in the DACL.

  Reference http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/distrib/dsce_ctl_qxju.mspx?mfr=true

Derrell
(This used to be commit 319df380e5)
2007-10-10 12:29:50 -05:00
Volker Lendecke
6051d51654 r24461: Fix Bug 4852, thank to anto <sistemac@prosoft.ba> for reporting it.
(This used to be commit 0fecd8a0c3)
2007-10-10 12:29:49 -05:00
Stefan Metzmacher
fe068284e9 r24458: regenerate pidl output after pidl fixes:
fixes winreg_EnumValues()

metze
(This used to be commit cedf7022c5)
2007-10-10 12:29:49 -05:00
Volker Lendecke
716e01d97e r24457: Convert reply_tcon to the new API
Jeremy, I really apologize for doing this, but I just wanted to enjoy
converting the last SMB call :-)

I've left one little task for you there, I'm not certain that checking
the inbuf length is correct here.

Volker
(This used to be commit 1e08fddafd)
2007-10-10 12:29:49 -05:00
Volker Lendecke
24f42c5cef r24453: Remove the read and write bmpx calls
Talked to both Tridge and Jeremy about this, Tridge said that there is a
special error message persuading OS/2 to fall back to other methods.
The calls now checked in always return the error message we used to
return when "read bmpx = False" was set (the default): ERRSRV, ERRuseSTD.

If someone has a reproducable test case where this is really needed, we
can always dig it up from version control and convert it to the new API.
But that time without that silly parameter, and with a torture test case
for "make test" please :-)

Volker
(This used to be commit d941aae2df)
2007-10-10 12:29:49 -05:00
Stefan Metzmacher
ffae125ad0 r24450: merge from SAMBA_4_0:
length_is() isn't supported without size_is().

I assume what we need is an array of strings,
so the code isn't used and broken anyway without
a testsuite...just get rid of the pidl warning

metze
(This used to be commit a3fd68d485)
2007-10-10 12:29:49 -05:00
Jeremy Allison
2823bf10b5 r24445: Convert SMBwritebraw. No test suite unfortunately.... I need to write one for this.
Jeremy
(This used to be commit edc17dfcbd)
2007-10-10 12:29:48 -05:00
Volker Lendecke
527905a09a r24444: Convert reply_find[n]close to the new API
(This used to be commit 6af8595346)
2007-10-10 12:29:48 -05:00