1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-14 12:23:52 +03:00
Commit Graph

767 Commits

Author SHA1 Message Date
Volker Lendecke
88b5a21d63 r15320: default "passdb expand explicit" to no 2007-10-10 11:16:35 -05:00
Volker Lendecke
c981bc7f31 r15133: in_server is not used anywhere 2007-10-10 11:16:25 -05:00
Jeremy Allison
9db6617756 r15112: Move strict locking default to auto. Fix up the error
return for one of the Samba4 torture tests.
Jeremy.
2007-10-10 11:16:24 -05:00
Jeremy Allison
08e52ead03 r15018: Merge Volker's ipc/trans2/nttrans changes over
into 3.0. Also merge the new POSIX lock code - this
is not enabled unless -DDEVELOPER is defined.
This doesn't yet map onto underlying system POSIX
locks. Updates vfs to allow lock queries.
Jeremy.
2007-10-10 11:15:57 -05:00
Gerald Carter
1e0b79e591 r15003: patch based on code from Arkady Glabek <aglabek@centeris.com> to ensure that global memory is freed when unloading pam_winbind.so (needs more testing on non-linux platforms) 2007-10-10 11:15:55 -05:00
Lars Müller
59175ee522 r14923: Return False in the case a parametrical option is not configured in
the config file.

For a "somesettings: foo = " we still return an empty line.
2007-10-10 11:15:54 -05:00
Lars Müller
b228474be0 r14922: Use BOOL for the returned value. 2007-10-10 11:15:54 -05:00
Lars Müller
a0d84ccc02 r14869: Allow to dump a paramatrical option.
Flaw: We print an empty line if the paramatrical option is not defined
in the requested section.
2007-10-10 11:15:52 -05:00
Gerald Carter
4ab372f4ca r14855: Various fixes:
* depreacte 'acl group control' after discussion with Jeremy
  and implement functionality as part of 'dos filemode'
* fix winbindd on a non-member server to expand local groups
* prevent code previously only used by smbd from blindly
  turning _NO_WINBINDD back on
2007-10-10 11:15:51 -05:00
Jeremy Allison
e7225f7e81 r14763: Add a new tuning parameter, open files database hash size,
this allows us to experiment with ensuring the tdb hash
size for our open files and locking db are appropriately
sized. Make the hash size larger by default (10007 instead
of 1049) and make the locking db hash size the same as the
open file db hash size.
Jeremy.
2007-10-10 11:15:46 -05:00
James Peach
514a767c57 r14668: Set the FILE_STATUS_OFFLINE bit by observing the events a DMAPI-based
HSM is interested in. Tested on both IRIX and SLES9.
2007-10-10 11:15:42 -05:00
Gerald Carter
db1162241f r14634: Many bug fixes thanks to train rides and overnight stays in airports
* Finally fix parsing idmap uid/gid ranges not to break with spaces
  surrounding the '-'
* Allow local groups to renamed by adding info level 2 to
  _samr_set_aliasinfo()
* Fix parsing bug in _samr_del_dom_alias() reply
* Prevent root from being deleted via Samba
* Prevent builting groups from being renamed or deleted
* Fix bug in pdb_tdb that broke renaming user accounts
* Make sure winbindd is running when trying to create the Administrators
  and Users BUILTIN groups automatically from smbd (and not just check the
  winbind nexted groups parameter value).
* Have the top level rid allocator verify that the RID it is about to
  grant is not already assigned in our own SAM (retries up to 250 times).
  This fixes passdb with existing SIDs assigned to users from the RID algorithm
  but not monotonically allocating the RIDs from passdb.
2007-10-10 11:15:41 -05:00
Gerald Carter
0e789b7e43 r14530: removing unused 'winbind max idle children' parameter 2007-10-10 11:15:36 -05:00
James Peach
950ed28f9f r14255: Revert r14204 which was horribly broken. 2007-10-10 11:15:21 -05:00
James Peach
5429c495c5 r14207: Convert the lp_acl_compatibility() param into an enum. 2007-10-10 11:15:16 -05:00
James Peach
23328fe6fc r14204: Remove the basically unused P_GSTRING and P_UGSTRING
parameter types.
2007-10-10 11:15:16 -05:00
Jeremy Allison
94e869d9c6 r14018: Coverity error CID #27. Missing return -1 on error condition.
Jeremy.
2007-10-10 11:11:05 -05:00
Jeremy Allison
1d710d06a2 r13915: Fixed a very interesting class of realloc() bugs found by Coverity.
realloc can return NULL in one of two cases - (1) the realloc failed,
(2) realloc succeeded but the new size requested was zero, in which
case this is identical to a free() call.

The error paths dealing with these two cases should be different,
but mostly weren't. Secondly the standard idiom for dealing with
realloc when you know the new size is non-zero is the following :

 tmp = realloc(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

However, there were *many* *many* places in Samba where we were
using the old (broken) idiom of :

 p = realloc(p, size)
 if (!p) {
    return error;
 }

which will leak the memory pointed to by p on realloc fail.

This commit (hopefully) fixes all these cases by moving to
a standard idiom of :

 p = SMB_REALLOC(p, size)
 if (!p) {
    return error;
 }

Where if the realloc returns null due to the realloc failing
or size == 0 we *guarentee* that the storage pointed to by p
has been freed. This allows me to remove a lot of code that
was dealing with the standard (more verbose) method that required
a tmp pointer. This is almost always what you want. When a
realloc fails you never usually want the old memory, you
want to free it and get into your error processing asap.

For the 11 remaining cases where we really do need to keep the
old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR,
which can be used as follows :

 tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the
pointer p, even on size == 0 or realloc fail. All this is
done by a hidden extra argument to Realloc(), BOOL free_old_on_error
which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR
macros (and their array counterparts).

It remains to be seen what this will do to our Coverity bug count :-).

Jeremy.
2007-10-10 11:10:59 -05:00
Gerald Carter
6d74de7a67 r13829: From the "It's not pretty but it works" category
* Finish prototype of the "add port command" implementation
  Format is "addportcommand portname deviceURI"

* DeviceURI is either
  - socket://hostname:port/
  - lpr://hostname/queue
  depending on what the client sent in the request
2007-10-10 11:10:56 -05:00
Gerald Carter
123e478ce5 r13815: "Into the blind world let us now descend,"
Began the poet, his face as pale as death.
"I will go first, and you will follow me."
---

Adding XcvDataPort() to the spoolss code for remotely
add ports.  The design is to allow an intuitive means
of creating a new CUPS print queue from the Windows 2000/XP
APW without hacks like specifying the deviceURI in the
location field of the printer properties dialog.

Also set 'default devmode = yes' as the new default
since it causes no harm and only is executed when you
have a NULL devmode anyways.
2007-10-10 11:10:55 -05:00
Gerald Carter
d640d81540 r13794: If you are going to go, go big. That's what I always say.
* disable winbind enum {users,groups} by default after
  further conversations with Volker.
2007-10-10 11:10:54 -05:00
Gerald Carter
b5f01559e1 r13772: More default changes
* winbind nested groups = yes
* host msdfs = ye
* msdfs root = yes
2007-10-10 11:10:53 -05:00
James Peach
37e12a196b r13736: Don't assume that printf can handle string arguments being NULL. Tidy
up typing and tighten error checking a little.
2007-10-10 11:10:51 -05:00
Jeremy Allison
b1915a0591 r13610: Patch from Bjoern JACKE <samba@j3e.de>. Don't default to
/tmp if there is no path in the share, make it unavailable.
All printer shares should have a path and IPC$ is already
explicitly set to tmpdir().
Jeremy.
2007-10-10 11:10:19 -05:00
Gerald Carter
b65be8874a r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
2007-10-10 11:10:14 -05:00
Gerald Carter
5385a01ee1 r13513: Changing defaults:
* enable privileges = yes
  * enable asu support = no

Remove unused function after the tdbsam rewrite.
2007-10-10 11:10:08 -05:00
Gerald Carter
7a2da5f0cc r13460: by popular demand....
* remove pdb_context data structure
* set default group for DOMAIN_RID_GUEST user as RID 513 (just
  like Windows)
* Allow RID 513 to resolve to always resolve to a name
* Remove auto mapping of guest account primary group given the
  previous 2 changes
2007-10-10 11:10:04 -05:00
Gerald Carter
6c4ede6cee r13393: Do not initialize the lp_svcctl_list() value since it is handled
internally in services_db.c now.  This prevents internal services from
being listed twice (one internal and one external) when no
'svcctl list' parameter is explcitly set in smb.conf
2007-10-10 11:09:58 -05:00
Gerald Carter
17e63ac4ed r13316: Let the carnage begin....
Sync with trunk as off r13315
2007-10-10 11:06:23 -05:00
Derrell Lipman
f2a24de769 r13212: r12414@cabra: derrell | 2006-01-28 17:52:17 -0500
lp_load() could not be called multiple times to modify parameter settings based
 on reading from multiple configuration settings.  Each time, it initialized all
 of the settings back to their defaults before reading the specified
 configuration file.

 This patch adds a parameter to lp_load() specifying whether the settings should
 be initialized.  It does, however, still force the settings to be initialized
 the first time, even if the request was to not initialize them.  (Not doing so
 could wreak havoc due to uninitialized values.)
2007-10-10 11:06:18 -05:00
James Peach
652b511ff2 r13027: Support file change notifications from FAM. 2007-10-10 11:06:11 -05:00
Volker Lendecke
2c3d5c029a r12735: After talking to Tridge and Jeremy... This needs to be made more generic
before it goes in.

Volker
2007-10-10 11:06:02 -05:00
Volker Lendecke
2253b17a1a r12721: GPFS 2.4 on Linux will contain some windows semantics, ie share modes and
oplocks across the cluster. Adapt Samba to it.

The gpfs API is called via libgpfs.so. This code is written with dlopen(), so
that you can compile on a system with gpfs installed and later on run on
systems without gpfs available.

So to actually make Samba call gpfs share mode calls you need to compile with
gpfs.h and libgpfs.so around and set 'gpfs share = yes' on the shares you
export from GPFS.

Volker
2007-10-10 11:06:01 -05:00
Günther Deschner
c727a1a330 r12415: Forgot newlines.
Guenther
2007-10-10 11:05:55 -05:00
Günther Deschner
6c4a6da3dc r12414: Remove the unnecessary SMB_STRDUP in server_role_str() + reuse the role
translation elsewhere.

Guenther
2007-10-10 11:05:55 -05:00
Volker Lendecke
de839cc165 r12290: Typo 2007-10-10 11:05:52 -05:00
Volker Lendecke
30fcdf84d8 r11999: Re-add "passdb expand explicit".
We came to the conclusion that changing the default is something that has to
wait one or two more releases, but it will happen one way or the other.

Volker
2007-10-10 11:05:41 -05:00
Volker Lendecke
5629ca1623 r11909: Implement 'reset on zero vc'. This kills other connections when a session
setup comes in with the vc (virtual connection) field set to zero. This is
done by Windows, probably you can tweak that by some registry key.

	This boolean option controls whether an incoming session setup
	should kill other connections coming from the same IP. This matches
        the default Windows 2003 behaviour.

	Setting this parameter to yes becomes necessary when you have a flaky
	network and windows decides to reconnect while the old connection
	still has files with share modes open. These files become inaccessible
	over the new connection.

	The client sends a zero VC on the new connection, and Windows 2003
	kills all other connections coming from the same IP. This way the
	locked files are accessible again.

	Please be aware that enabling this option will kill connections behind
	a masquerading router.

Volker
2007-10-10 11:05:34 -05:00
Volker Lendecke
99d76042e9 r11739: As per Jeremy's request, add a panic action for developers. Now configure.in
needs something along the lines of

if [ $LOGNAME == "jht" ]
then
   CFLAGS="$CFLAGS -DDEVELOPER"
fi

But that goes a bit far I think.... :-)))

Volker
2007-10-10 11:05:26 -05:00
Volker Lendecke
5b882acafb r11734: Remove unused variable 2007-10-10 11:05:26 -05:00
Gerald Carter
59c00924b6 r11579: syncing up perf counter code cfrom trunk 2007-10-10 11:05:21 -05:00
Jeremy Allison
f1e0c86363 r11494: Finally fix #3192 - remember iDiskfreeCacheTime is
an *integer*, not a pointer. Doh !
Jeremy.
2007-10-10 11:05:18 -05:00
Gerald Carter
88a33c4cf8 r11296: removing unused variable and ifdef'd out code 2007-10-10 11:05:11 -05:00
Gerald Carter
e0bf0581f0 r11295: new service hashing code has assumign that the service
name stored in the array was normalized.  This was causing
records to not be deleted on a reload.  As a result,
I was getting the wrong path for various services.
Seems to be ok after this change.

Also converted canonicalize_servicename() to just
use strupper_m() rather than doing the conversion itself.
Jeremy, i think this should be ok but please check.

also cleaned up some things in the hash service code
and added debug messages for sanity purposes.
2007-10-10 11:05:11 -05:00
Jeremy Allison
83d0cda858 r11269: Ensure the new canonicalize_servicename() is mb safe.
MB service names may contain embedded ' ' characters.
Jeremy.
2007-10-10 11:05:10 -05:00
Volker Lendecke
d07343e0c4 r11266: Speed up loading smb.conf for large numbers of share definitions. The problem
was a O(n^2) loop: Whenever a service definition was found, we linearly
searched the already loaded share definitions, the patch adds an internal tdb
for this. For a smb.conf with 2000 shares this speeds up loading by about a
factor of 50.

Might be a fix for bug #1117.

Thanks to Michael Adam <ma@sernet.de>,

Volker
2007-10-10 11:05:10 -05:00
Jeremy Allison
49ef8b88a3 r11190: Fix enhancement request #3192.
This does 2 things.
1). Makes dfree command a per-share parameter (it should be anyway IMHO).
2). Adds a "dfree cache time" parameter in seconds that specifies how long a
dfree command output should be cached for. Default is zero (no caching).
Jeremy.
2007-10-10 11:05:06 -05:00
Gerald Carter
0e60813ed0 r11169: removing duplicate 'map read only' entry 2007-10-10 11:05:05 -05:00
Jeremy Allison
da4238d18c r10979: After discussions on IRC about profile shares,
added new parameter : map readonly = [yes|no|permissions]
If yes: map inverse of user "w" bit to mean readonly.
If no: never set DOS readonly bit.
If permissions: check file permissions for user and set readonly
bit if the current user cannot write.
If store dos attributes is set to yes then this parameter
is ignored.
Jeremy.
2007-10-10 11:04:59 -05:00
Jim McDonough
8210b0503a r10911: part of #2861: add rename support for usrmgr.exe when using tdbsam
This gets it working before replacing tdb with the samba4 version.
2007-10-10 11:04:56 -05:00