1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-18 17:57:55 +03:00

736 Commits

Author SHA1 Message Date
Volker Lendecke
9b10dbbd5d r23183: Check in a change made by Tridge:
This replaces the internal explicit dev/ino file id representation by a
"struct file_id". This is necessary as cluster file systems and NFS
don't necessarily assign the same device number to the shared file
system. With this structure in place we can now easily add different
schemes to map a file to a unique 64-bit device node.

Jeremy, you might note that I did not change the external interface of
smb_share_modes.c.

Volker
2007-10-10 12:22:52 -05:00
Volker Lendecke
4afe37d431 r23168: Move the lp_max_connections() into service.c. 2007-10-10 12:22:51 -05:00
Volker Lendecke
3452a870d5 r23167: Remove an unused parameter 2007-10-10 12:22:51 -05:00
Volker Lendecke
3f5eb8a960 r23112: Trim down the message.c API slightly: The messages_pending_for_pid is now
replaced by MSG_FLAG_LOWPRIORITY or'ed into the msg_type. To enable this,
changed the msg_type definitions to hexadecimal.

This way we could theoretically add the MSG_FLAG_NODUPLICATES again, but I
would rather not do this, because that one is racy and can't be guaranteed at
all.
2007-10-10 12:22:47 -05:00
Volker Lendecke
eaefd00563 r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
doing this because for the clustering the marshalling is needed in more
than one place, so I wanted a decent routine to marshall a message_rec
struct which was not there before.

Tridge, this seems about the same speed as it used to be before, the
librpc/ndr overhead in my tests was under the noise.

Volker
2007-10-10 12:22:17 -05:00
Volker Lendecke
697099f06e r23023: Get rid of the only caller of message_send_pid_with_timeout(). This replaces
the timeouts on the individual message send calls with an overall timeout on
all the calls.

The timeout in message_send_pid_with_timeout() did not make much sense IMO
anyway, because the tdb_fetch() for the messages_pending_for_pid was blocking
in a readlock anyway, we "just" did the timeout for the write lock.

This new code goes through the full wait for the write lock once and then
breaks out of sending the notifies instead of running into the timeout per
target.

Jerry, please check this!

Thanks,

Volker
2007-10-10 12:22:16 -05:00
Volker Lendecke
9b8df24107 r22954: More messaging_register 2007-10-10 12:22:11 -05:00
Volker Lendecke
c8b9827340 r22895: Convert some more calls from message_send_buf to messaging_send_buf 2007-10-10 12:22:05 -05:00
Volker Lendecke
74fa57ca5d r22868: Replace some message_send_pid calls with messaging_send_pid calls. More
tomorrow.
2007-10-10 12:22:04 -05:00
Gerald Carter
f65214be68 r22852: merge fixes for CVE-2007-2446 and CVE-2007-2447 to all branches 2007-10-10 12:22:02 -05:00
Volker Lendecke
3d3d61687e r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; and
replace all data_blob(NULL, 0) calls.
2007-10-10 12:22:01 -05:00
Volker Lendecke
a66a04e9f1 r22747: Fix some C++ warnings 2007-10-10 12:21:54 -05:00
Volker Lendecke
0ad4b1226c r22736: Start to merge the low-hanging fruit from the now 7000-line cluster patch.
This changes "struct process_id" to "struct server_id", keeping both is
just too much hassle. No functional change (I hope ;-))

Volker
2007-10-10 12:21:52 -05:00
Jeremy Allison
8968808c3b r22589: Make TALLOC_ARRAY consistent across all uses.
Jeremy.
2007-10-10 12:19:49 -05:00
Jeremy Allison
f6fa3080fe r22542: Move over to using the _strict varients of the talloc
calls. No functional changes. Looks bigger than it is :-).
Jeremy.
2007-10-10 12:19:44 -05:00
Günther Deschner
e55c52f654 r22524: Fix memleak.
Guenther
2007-10-10 12:19:42 -05:00
Stefan Metzmacher
3a28443079 r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users

metze
2007-10-10 12:19:00 -05:00
Stefan Metzmacher
1897da9efc r21989: make use of tdb_*_bystring() and string_term_tdb_data()
to avoid creating the TDB_DATA struct from strings "by hand"

metze
2007-10-10 12:18:57 -05:00
Stefan Metzmacher
2f52df7103 r21988: make use of string_tdb_data()
to avoid creating the TDB_DATA struct from strings "by hand"

metze
2007-10-10 12:18:57 -05:00
Stefan Metzmacher
724c6fa337 r21987: split tdb_prs_*() functions in version which take a keystr and a TDB_DATA key
metze
2007-10-10 12:18:56 -05:00
Volker Lendecke
6d093043ed r21958: Fix Coverity ID 343 (dead code) 2007-10-10 12:18:52 -05:00
Gerald Carter
328807ec7b r21875: BUG 3275: Patch from Andy Polyakov <appro@fy.chalmers.se>
Relax check for i386 header checks in the PE header of printer
driver files.  Thus allowing uploading of x64 print drivers
from 64bit Windows clients.
2007-10-10 12:18:42 -05:00
Gerald Carter
5b47c4e5c2 r21862: add the cups comment and location lookup to get_a_printer_2_default() as well 2007-10-10 12:18:39 -05:00
Gerald Carter
e859e1fdcd r21861: Pull the comment and location from CUPS if we don't have one
when fetching a printer from ntprinters.tdb.

Slightly modified from original version submitted on
samba-technical ml by Andy Polyakov <appro@fy.chalmers.se>
2007-10-10 12:18:39 -05:00
Jeremy Allison
b8327b21dd r21672: The cannonical file access pattern should look like this :
srvstr_get_path(inbuf, name, smb_buf(inbuf) + 1, sizeof(name), 0, STR_TERMINATE, &status);
	if (!NT_STATUS_IS_OK(status)) {
		return ERROR_NT(status);
	}

	RESOLVE_DFSPATH(name, conn, inbuf, outbuf);

	status = unix_convert(conn, name, False, NULL, &sbuf);
	if (!NT_STATUS_IS_OK(status)) {
		return ERROR_NT(status);
	}

	status = check_name(conn, name);
	if (!NT_STATUS_IS_OK(status)) {
		return ERROR_NT(status);
	}

Make sure that every access pattern (including the
wildcard generated paths from unlink, rename, and copy)
do the same. Tidy things up a bit....

Jeremy.
2007-10-10 12:18:23 -05:00
Simo Sorce
5b4838f62a r21606: Implement escaping function for ldap RDN values
Fix escaping of DN components and filters around the code
Add some notes to commandline help messages about how to pass DNs

revert jra's "concistency" commit to nsswitch/winbindd_ads.c, as it was
incorrect.
The 2 functions use DNs in different ways.

- lookup_usergroups_member() uses the DN in a search filter,
and must use the filter escaping function to escape it
Escaping filters that include escaped DNs ("\," becomes "\5c,") is the
correct way to do it (tested against W2k3).

- lookup_usergroups_memberof() instead uses the DN ultimately as a base dn.
Both functions do NOT need any DN escaping function as DNs can't be reliably
escaped when in a string form, intead each single RDN value must be escaped
separately.

DNs coming from other ldap calls (like ads_get_dn()), do not need escaping as
they come already escaped on the wire and passed as is by the ldap libraries

DN filtering has been tested.
For example now it is possible to do something like:
'net ads add user joe#5' as now the '#' character is correctly escaped when
building the DN, previously such a call failed with Invalid DN Syntax.

Simo.
2007-10-10 12:18:16 -05:00
Volker Lendecke
19ee677925 r21446: Karolins "printjob username" 2007-10-10 12:18:04 -05:00
Gerald Carter
fa5490b71b r21258: Fix for connecting printers from Vista by storing
the printer GUID as a REG_SZ as Vista seems to
whine about unknown REG_BINARY values.

Thanks to Martin Zielinski <mz@seh.de> for his excellent
analysis on this.
2007-10-10 12:17:52 -05:00
Volker Lendecke
c8ae60ed65 r21064: The core of this patch is
void message_register(int msg_type,
                      void (*fn)(int msg_type, struct process_id pid,
-                                void *buf, size_t len))
+                                void *buf, size_t len,
+                                void *private_data),
+                     void *private_data)
 {
        struct dispatch_fns *dfn;

So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.

Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.

Volker
2007-10-10 12:17:32 -05:00
Volker Lendecke
21b8f15dd5 r20796: Fix the same problem Jeremy has fixed (improper handling of deferred opens)
for delete_driver_files. Proper fix pending... :-)

Jeremy, please check.

Volker
2007-10-10 12:17:09 -05:00
Jeremy Allison
f4474edf6a r20718: Sync up the filename path parsing changes from SAMBA_3_0_24.
The only difference between the two trees now w.r.t file
serving are the changes to smbd/open.c in this branch I need
to review.
Jeremy.
2007-10-10 12:17:04 -05:00
Volker Lendecke
5ebdf02ba1 r20544: Change copy_file() to return NTSTATUS. This is in preparation of turning
close_file() to NTSTATUS as well.

I'm not sure I got all the error codes right, but as I've never come across a
smb_copy() call in all my Samba work, I'm leaving it at that. If I'm
absolutely bored, I will write a thorough torture test.

As far as I can see, Samba4 even does not have a libcli implementation for
it...  :-)

Volker
2007-10-10 12:16:56 -05:00
Volker Lendecke
6dd0886b49 r20339: Make mkdir_internal static to open.c 2007-10-10 12:16:42 -05:00
Herb Lewis
41be182f78 r20269: merge -r20264:20267 from SAMBA_3_0_24
more no previous prototype warnings
2007-10-10 12:16:38 -05:00
Herb Lewis
e9df051f52 r20245: merge 20244 from samba_3_0_24
get rid of more nested extern declarations warnings
2007-10-10 12:16:36 -05:00
Herb Lewis
e710a7d39a r20131: get rid of a few no previous prototype warnings 2007-10-10 12:16:26 -05:00
Herb Lewis
ac3eb7813e r20124: clean up nested extern declaration warnings 2007-10-10 12:16:26 -05:00
Jelmer Vernooij
b41c52b9db r18745: Use the Samba4 data structures for security descriptors and security descriptor
buffers.

Make security access masks simply a uint32 rather than a structure
with a uint32 in it.
2007-10-10 12:00:54 -05:00
Jelmer Vernooij
5de76767e8 r18654: Rename "struct uuid" => "struct GUID" for consistency. 2007-10-10 11:52:19 -05:00
Stefan Metzmacher
2f58645b70 r18605: sync dlinklist.h with samba4, that means DLIST_ADD_END()
and DLIST_DEMOTE() now take the type of the tmp pointer
not the tmp pointer itself anymore.

metze
2007-10-10 11:51:59 -05:00
Volker Lendecke
86f4ca84f2 r18047: More C++ stuff 2007-10-10 11:43:24 -05:00
Volker Lendecke
b2ff9680eb r18019: Fix a C++ warnings: Don't use void * in libads/ for LDAPMessage anymore.
Compiled it on systems with and without LDAP, I hope it does not break the
build farm too badly. If it does, I'll fix it tomorrow.

Volker
2007-10-10 11:39:49 -05:00
Jelmer Vernooij
3f665f4ec4 r17816: Merge my cupsprot branch. It is now possible to (optionally) specify :port in
the "cups server" smb.conf parameter.
2007-10-10 11:38:51 -05:00
Volker Lendecke
949cd6b992 r17622: Add a framework for a printing backend designed to support the build farm. If
we want to walk more printing code in the build farm I think doing that with a
customized printing backend is much easier than with a set of shell scripts.

Jerry, comments?

Volker
2007-10-10 11:38:44 -05:00
Volker Lendecke
b7ec240880 r17590: Some C++ Warnings 2007-10-10 11:38:41 -05:00
Jeremy Allison
4ace291278 r17293: After the results from the cluster tests in Germany,
fix the messaging code to call the efficient calls :

save_re_uid()
set_effective_uid(0);

messaging_op

restore_re_uid();

instead of using heavyweight become_root()/unbecome_root()
pairs around all messaging code. Fixup the messaging
code to ensure sec_init() is called (only once) so that non-root
processes still work when sending messages.

This is a lighter weight solution to become_root()/unbecome_root()
(which swaps all the supplemental groups) and should be more
efficient. I will migrate all server code over to using this
(a similar technique should be used in the passdb backend
where needed).

Jeremy.
2007-10-10 11:38:24 -05:00
Jeremy Allison
9dafb7f48c r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
2007-10-10 11:19:14 -05:00
Gerald Carter
a25e75e78d r16701: Fix segv when adding a printer caused by not initializing the
realm name in ads_init() in nt_printer_publish().
2007-10-10 11:19:09 -05:00
Jeremy Allison
2eefe9b6f5 r16648: Fix bug #3889 reported by jason@ncac.gwu.edu.
Jeremy.
2007-10-10 11:19:06 -05:00
Jeremy Allison
4c3019eb99 r16626: Fix bug #3878. Reported by jason@ncac.gwu.edu.
Jeremy.
2007-10-10 11:19:04 -05:00