1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

23184 Commits

Author SHA1 Message Date
Volker Lendecke
6de1b0b65b r24951: Warn if "os level" > 255
Thanks to Karolin Seeger <ks@sernet.de>
(This used to be commit 3abf06efc1286090caf380eb685e90ba7f412748)
2007-10-10 12:30:29 -05:00
Volker Lendecke
ff0947fbed r24949: Remove some static buffers
(This used to be commit df648d47ff3c4e24f439fda839653bda98323100)
2007-10-10 12:30:29 -05:00
Volker Lendecke
faefb22c61 r24943: Some stackframes
(This used to be commit cddb9f11d5fafcd3797cb242775c37f0c04d4f15)
2007-10-10 12:30:29 -05:00
Günther Deschner
46928878f6 r24920: Reformatting.
Guenther
(This used to be commit 62426a055513c309a381d0d96d60edc07e6dfcdf)
2007-10-10 12:30:29 -05:00
Volker Lendecke
3bcf187a0d r24903: One more tick in #if 0 code
(This used to be commit e0b4fb55e3176785a85d66efece15d0a366a35f1)
2007-10-10 12:30:29 -05:00
Volker Lendecke
2800362e3f r24902: DEBUG might use talloc_tos() itself...
(This used to be commit 1b39374a173bf6b40426000d010d092e94afc4d7)
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 f379a5c47d5004a5a66b6c12ec119c739b9e146d)
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 9b25355dd66519afd548fecbf2da7608b024a35b)
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 1f122352b02e3f4be9ac2d638b18807dafd05429)
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 86af9fedad71697f22cc739518340f7753b8f9da)
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 dc0b08e6590caa4974fd4d9f34f39f261d1f1dee)
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 cb3583b39212688a627a29bbddb2e98497714d42)
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 f1bbf9bc18fc615a5660674f8346b4a7bed50044)
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 ef92d505c04397614cb0dd5ede967e9017a5e302)
2007-10-10 12:30:27 -05:00
Günther Deschner
51e5001cba r24842: Fix build warning.
Guenther
(This used to be commit 205ef6ab3e9332a2a4a4f775c2cdddbcd3ec739d)
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 ce7c816083db6fc844b936a14dd593fe1ef07374)
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 28f9b8d98dabd9ba8e812ca01bcf4fc192fb5e44)
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 58d31e057b57bc69a96e63aabba9aa1da5418d83)
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 af90c6949c929c82d4390b2f87a420bd598275dd)
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 7f42fe4e08c0899f5e8addbc5135d87af193ee68)
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 b3dcadbed0b4a1b7bb2e83df2c66bca9dcbcad60)
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 90626652084c2ada6b2eb041db652720c03a1c3b)
2007-10-10 12:30:26 -05:00
Michael Adam
464227599e r24828: Give smbcontrol an initial talloc stackframe.
(This used to be commit 55020b07b5568104091352fd3ae21e2b29e34501)
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 dbe38995ec6d2251562a3b10e750bbd681008e16)
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 0a9171f9efc2322954c0d06757b91d9124ab8a8e)
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 705336ee1098a2c4d6e933dfa3e2f2968fa717ad)
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 c97600b96f6315df8ab0d7ad186423ab75dd4ab5)
2007-10-10 12:30:25 -05:00
Jeremy Allison
dacdde6e5c r24813: Reformat to 80 columns.
Jeremy.
(This used to be commit c6c8f5a897602d53876fe75e86283d97a394037d)
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 0cdf046dae8ba0741bb7786aa4e85c34fc35dade)
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 6585ea2cb7f417e14540495b9c7380fe9c8c717b)
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 229e02d732c1612c7dc4510325da1dcf50050a95)
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 46dbd6034ec2c6475f428cd2d5cce56268bc34a7)
2007-10-10 12:30:23 -05:00
Günther Deschner
b2a1a4a0fe r24806: Fix the build, sorry...
Guenther
(This used to be commit cd1fccaf8f2ad6e6e4c51909aa7a925efc0a13c4)
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 91d10fe1598b92090a94286f84395caa1bdf7a41)
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 f5b3de4d3069eaa750240e3422bac5cb169b6c0a)
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 08e309e955eea58df1eb88f848386eb2acbd31ba)
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 1f396cc237e3861b216d03a7af9e461578cf448a)
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 c7047604446c3fc33b5e14833267ac8ad3a906b1)
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 e5cc09c72f4acc851ed53ca02def5d692000d0da)
2007-10-10 12:30:22 -05:00
Günther Deschner
b79f9b0870 r24797: Fix logic in dsgetdcname().
Guenther
(This used to be commit aca2d78db139ed32bcedec9861e83cb8c42809cf)
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 45380f356b99d575645873b05af17c504b091dc8)
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 30d99d8ac3379caadc5bdb353977149d1ee16403)
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 ba05dc013fd14a7c8c3d7775dad9a70d45289de0)
2007-10-10 12:30:21 -05:00
Günther Deschner
8499943338 r24786: Fix another build warning.
Guenther
(This used to be commit 29a56dcc78c49653bcf72dea6313fd4852de8f72)
2007-10-10 12:30:21 -05:00
Günther Deschner
46fad0ca27 r24785: Put checks in parentheses.
Guenther
(This used to be commit d8197aca5a4a509d318124f708fe15c35a2b4e11)
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 3b7ed3ea881dc59b77a067d5d3738e9e03b6c538)
2007-10-10 12:30:21 -05:00
Günther Deschner
6824731cb0 r24783: Remove unused off_t type.
Guenther
(This used to be commit 85c816c27f2b9d20dfaf411b12ec1803a49574ce)
2007-10-10 12:30:21 -05:00
Volker Lendecke
1a13b09894 r24782: Fix C++ warnings
(This used to be commit f7e8df81ef9e1deadb1251e5e5959e90a4432f40)
2007-10-10 12:30:20 -05:00
Günther Deschner
24fc1d6dd5 r24781: Fix build warning.
Guenther
(This used to be commit 71307c371fea917b91214df7a24cd91170d40dd9)
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 fb9228b8d167552f0a046ab674f66d4e5b73f5b6)
2007-10-10 12:30:20 -05:00