samba.git
20 years agoModified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (MORIYAM...
Jeremy Allison [Sat, 13 Mar 2004 02:16:26 +0000 (02:16 +0000)]
Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (MORIYAMA Masayuki).
Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios
and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name
when represented in dos charset (ie. cp932). So go back to using fstrings for these but
translate into nstrings (ie. 16 byte length values) for transport on the wire.
Jeremy.
(This used to be commit 128dec9ae68fd357550de2649d54056ca4fc65cf)

20 years agoFirst part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) to
Jeremy Allison [Sat, 13 Mar 2004 00:28:55 +0000 (00:28 +0000)]
First part of patch from moriyama@miraclelinux.com (MORIYAMA Masayuki) to
fix up netbios names with mb strings. Includes reformat of libsmb/nmblib.c
so it's readable.
Jeremy.
(This used to be commit beca3829d1140bf7c2e394993a02dff1f2cf7bbd)

20 years agoBug report 1079 and fix both from Bert Driehuis.
Christopher R. Hertel [Fri, 12 Mar 2004 20:27:23 +0000 (20:27 +0000)]
Bug report 1079 and fix both from Bert Driehuis.

This is an odd corner case having to do with <1C> group names (DC names).
<1C> group names are called (by MS) "Internet Special Groups", which means
that Microsoft's WINS servers will attempt to handle these names in
something approximating an RFC1001/1002 compliant manner.

The problem being reported here is this:  If an initial registration sent
by one of the group members is lost (network error, whatever) then
subsequent refreshes from that particular machine will also fail.  This
only happens if the name is already active (because of other group
members).

In most cases, we (and MS) handle refreshes as registrations if the name
is not in the database.  In this situation, we missed the corner case.

Bert's fix adds an 'else if' that catches the situation in which a refresh
for an unlisted IP of an active <1C> group name is received.  The refresh
is simply handled as a registration when this happens.

[Note: Committing in HEAD.  I am writing some tools to do registrations
       and refreshes so that I can test this.  I don't have an NT Domain
       for testing so I'm going to have to fudge.  This fix is small (I
       cleaned up some Debug messages and comments in addition to the fix)
       and if you want to test it with 3.0.x you can just copy the HEAD
       version into your 3.0.x tree and recompile.]
(This used to be commit 8e52439f4ae9de84107e2d0e9f33f0d4e3c5945a)

20 years agoFix from Robert.Dahlem@gmx.net (Robert Dahlem) for bugid #1048
Jeremy Allison [Fri, 12 Mar 2004 20:24:07 +0000 (20:24 +0000)]
Fix from Robert.Dahlem@gmx.net (Robert Dahlem) for bugid #1048
when mangled names are turned off.
Jeremy.
(This used to be commit 11487e24666c7b3dd4b37f4ef8aec8f8a5bd5a6f)

20 years agoFix problems with very long filenames in both smbd and smbclient.
Alexander Bokovoy [Fri, 12 Mar 2004 14:28:14 +0000 (14:28 +0000)]
Fix problems with very long filenames in both smbd and smbclient.
It appears that we pass filename through resolve_wildcards() as pstring and use fstring temporary buffer there.
As result, a long filename in unix charset (UTF-8 by default) can easily expand over 255 bytes while
Windows is able to send to us such names (e.g. Japanese name of ~190 mb chars) which we unable to process through
this small fstring buffer. Tested with W2K and smbclient, Japanese and Cyrillics.
(This used to be commit cc70a548f3c48a9503fd54d01896cc2499f5bbcd)

20 years agoFix build after Jeremy -- yet another place where convert_string() wasn't updated
Alexander Bokovoy [Fri, 12 Mar 2004 12:58:49 +0000 (12:58 +0000)]
Fix build after Jeremy -- yet another place where convert_string() wasn't updated
(This used to be commit e117ed1db84b2447793ccea4036e225c4a552e1e)

20 years agoFix string overflow due to wrong size calculation
Alexander Bokovoy [Fri, 12 Mar 2004 11:29:13 +0000 (11:29 +0000)]
Fix string overflow due to wrong size calculation
(This used to be commit cf0285f3ea017d300d94e8c7f7042ae8ccc8f960)

20 years agoAllow msdfs symlink syntax to be more forgiving (it took me ages to remember
Jeremy Allison [Fri, 12 Mar 2004 01:43:23 +0000 (01:43 +0000)]
Allow msdfs symlink syntax to be more forgiving (it took me ages to remember
what it was :-). Allow msdfs links to now look like UNC paths : eg.
sym_link -> msdfs://server/share/path/in/share
or :
sym_link -> msdfs:\\server\share\path\in\share
Jeremy.
(This used to be commit 3c89393e2907e4a3318fb3e94a911cd35f16b4c2)

20 years agoFix bug introduced by Jim (touche :-) :-) - use new smbldap_get_single_pstring
Jeremy Allison [Thu, 11 Mar 2004 23:02:52 +0000 (23:02 +0000)]
Fix bug introduced by Jim (touche :-) :-) - use new smbldap_get_single_pstring
call :-).
Jeremy.
(This used to be commit 3c9fd2bdee097394cb0d0b6683748835c6a2d3a0)

20 years agoRestore the contract on all convert_stringXX() interfaces. Add a "allow_bad_conv"
Jeremy Allison [Thu, 11 Mar 2004 22:59:58 +0000 (22:59 +0000)]
Restore the contract on all convert_stringXX() interfaces. Add a "allow_bad_conv"
boolean parameter that allows broken iconv conversions to work. Gets rid of the
nasty errno checks in mangle_hash2 and check_path_syntax and allows correct
return code checking.
Jeremy.
(This used to be commit 3b4fca7b7f410cb0f11322e22c8f26a662eff941)

20 years agoMerge from 3.0. Fix munged dial in pdb_ldap
Jim McDonough [Thu, 11 Mar 2004 18:10:08 +0000 (18:10 +0000)]
Merge from 3.0.  Fix munged dial in pdb_ldap
(This used to be commit 46544e957f00f71e3a49e3d90cd88b4cf1b33408)

20 years agoadd missing #ifdef HAVE_BICONV stuff
Herb Lewis [Thu, 11 Mar 2004 15:14:48 +0000 (15:14 +0000)]
add missing #ifdef HAVE_BICONV stuff
(This used to be commit 5e831f48f0d15a02a3bc406a7dc5249a57ceec4f)

20 years agoBUG 1088: patch from SATOH Fumiyasu <fumiya@miraclinux.com> -- use strchr_m() for...
Gerald Carter [Thu, 11 Mar 2004 14:52:35 +0000 (14:52 +0000)]
BUG 1088: patch from SATOH Fumiyasu <fumiya@miraclinux.com> -- use strchr_m() for query_host (smbclient -L)
(This used to be commit e7d2315e45df7e2e4e586a8fc4a32d6880e83e4f)

20 years agoEnsure we use check_path_syntax() to pull out DFS paths.
Jeremy Allison [Thu, 11 Mar 2004 00:42:36 +0000 (00:42 +0000)]
Ensure we use check_path_syntax() to pull out DFS paths.
Jeremy
(This used to be commit ebf82e2c14827c0a0edd8ee373ce5200f7b0b3b0)

20 years agoFix processing of pathnames with embedded '\\' characters (0x5c) in CP932
Jeremy Allison [Thu, 11 Mar 2004 00:31:50 +0000 (00:31 +0000)]
Fix processing of pathnames with embedded '\\' characters (0x5c) in CP932
character set. Because of the allowing of "broken conversions" for people
who have broken iconv libraries we can't rely on the return from convert_string()
to be valid - we must check errno instead. This is ripe for revisiting at
some stage. I prefer adding a bool parameter to all convert_string_XX varients
to specify if we will allow broken conversions or not. With "allow_broken_conversions"
set to false we could then rely on the return from convert_string rather than
checking errno.
Jeremy.
(This used to be commit 30c30c5ac53ec8f32a44d0b1b39cc99fe9844467)

20 years agolsa_enumaccounts lists all SIDs that have been granted privileges. Simo,
Volker Lendecke [Wed, 10 Mar 2004 17:06:13 +0000 (17:06 +0000)]
lsa_enumaccounts lists all SIDs that have been granted privileges. Simo,
you should look at this.

Change behaviour from listing all groups to listing only BUILTIN\Administrator

Volker
(This used to be commit 32d196e9bbf203855832da16eff3dee495679928)

20 years agoRemove expanding sids from smbd, this will be done in winbindd.
Volker Lendecke [Wed, 10 Mar 2004 16:40:41 +0000 (16:40 +0000)]
Remove expanding sids from smbd, this will be done in winbindd.

Volker
(This used to be commit 67bb1d2338b0d5ba3f8a4754ff1479cd42cfb051)

20 years agoApply some const
Volker Lendecke [Wed, 10 Mar 2004 16:32:58 +0000 (16:32 +0000)]
Apply some const
(This used to be commit e2696b81bb5e4d12281cf99dc50f91844ae51c2e)

20 years agoDon't pass DOM_SIDs around when pointers are enough.
Volker Lendecke [Wed, 10 Mar 2004 16:17:46 +0000 (16:17 +0000)]
Don't pass DOM_SIDs around when pointers are enough.

Volker
(This used to be commit 27b27c28cd0421be3121e7f03c237df381c7ecb3)

20 years agoanother type
Herb Lewis [Wed, 10 Mar 2004 03:09:28 +0000 (03:09 +0000)]
another type
(This used to be commit 40634650d0489ebef17e090ef4544b772538b3dc)

20 years agoMoving towards getting msdfs working again (this looks like it was broken
Jeremy Allison [Wed, 10 Mar 2004 02:38:36 +0000 (02:38 +0000)]
Moving towards getting msdfs working again (this looks like it was broken
in 3.0.2a actually). We now send a correct referral back, but the client
refuses to follow it... Not sure why. Will do more tests.. Maybe unicode
character count is wrong (it looks it).
Jeremy.
(This used to be commit 859529aff348e66281d2ec4d54c5852121aae9e5)

20 years agoFormatting reformat before I start to change anything here.
Jeremy Allison [Wed, 10 Mar 2004 01:32:24 +0000 (01:32 +0000)]
Formatting reformat before I start to change anything here.
Jeremy.
(This used to be commit e93aeb96771125ef8775a531257e7390217204d0)

20 years agofix type for tag in proto file
Herb Lewis [Wed, 10 Mar 2004 00:52:59 +0000 (00:52 +0000)]
fix type for tag in proto file
(This used to be commit cd1ed1a23b15002aab3387c6f6316f85574c11e8)

20 years agoFix dfs referrals - don't use check_path_syntax. Also use mb char calls in
Jeremy Allison [Tue, 9 Mar 2004 23:26:56 +0000 (23:26 +0000)]
Fix dfs referrals - don't use check_path_syntax. Also use mb char calls in
dfs code.
Jeremy.
(This used to be commit 70670841028aaeb72267ac41ca30af8dba412998)

20 years agoYet another '\n' termination of debug message.
Rafal Szczesniak [Tue, 9 Mar 2004 21:48:46 +0000 (21:48 +0000)]
Yet another '\n' termination of debug message.

rafal
(This used to be commit 6c8e39b7ccc1ad8e7f39c2a51fa13423e5d6e227)

20 years agoForgot to put some more comments.
Rafal Szczesniak [Tue, 9 Mar 2004 20:44:39 +0000 (20:44 +0000)]
Forgot to put some more comments.

rafal
(This used to be commit b3efdcf0aeec5a115c53de8bbedaa9ca8225b689)

20 years ago1) Two new functions to trust passwords interface in passdb:
Rafal Szczesniak [Tue, 9 Mar 2004 20:30:35 +0000 (20:30 +0000)]
1) Two new functions to trust passwords interface in passdb:
   settrustpwent, gettrustpwnam

2) Implementation of another couple of these functions in tdbsam:
   settrustpwent, gettrustpwnam, gettrustpwsid

3) Testing (mostly for now) usage of the interface in pdbedit
   which is soon to be offline tool back again.

This is quite a new code, so many changes will be put in soon.

rafal
(This used to be commit 2ed23fbce846f9710747d72aa98c20d54894d61e)

20 years agoFix to debug message lacking termination with '\n'.
Rafal Szczesniak [Tue, 9 Mar 2004 18:56:28 +0000 (18:56 +0000)]
Fix to debug message lacking termination with '\n'.

rafal
(This used to be commit 6fdb20f5a7657556a3e4ceb4cab8c1d67e29ea21)

20 years agofix build with gcc 2.96 and --with-developer
Gerald Carter [Tue, 9 Mar 2004 15:29:40 +0000 (15:29 +0000)]
fix build with gcc 2.96 and --with-developer
(This used to be commit 45b2efd60a3c3c9f01b1ccaa828904a70d70d67d)

20 years agoCommit to HEAD the updates to smb signing code that I was propsing for 3.0.
Andrew Bartlett [Tue, 9 Mar 2004 12:37:05 +0000 (12:37 +0000)]
Commit to HEAD the updates to smb signing code that I was propsing for 3.0.

This code implements 'opportunistic signing' in our client (when the
server supports it, we will use it), and correct downgrading on both
the client and server for the 'enabled' (rather than required) signing
level.

This means that we can actually set 'server signing = yes' and not
have the world fall apart.  We had a number of bugs in that code, and
it certainly looks like most of the testing was with the 'requried'
setting.

While the changes are reasonable, I'm putting this into HEAD rather
than 3.0 for the timebeing.  SMB signing, like NTLMSSP, tends to have
gotchas in it :-)

(I also need to give it a workout with more than smbclient before I
move it across).

Andrew Bartlett
(This used to be commit 6bad895462cf076a7e917c909e2a461d1b360bf1)

20 years agoMerge fixes and tests for jra's broken strstr_m() function from 3.0
Andrew Bartlett [Tue, 9 Mar 2004 11:42:58 +0000 (11:42 +0000)]
Merge fixes and tests for jra's broken strstr_m() function from 3.0

STF rules!  (Pity we don't use it for more stuff)

Andrew Bartlett
(This used to be commit a9363b45b0ef652a5fd621915fafb97ada0c7d5e)

20 years agoAdded strstr_m() function. Use in all places where we might run into mb
Jeremy Allison [Tue, 9 Mar 2004 00:17:16 +0000 (00:17 +0000)]
Added strstr_m() function. Use in all places where we might run into mb
(should fix the mb service name problem, can't remember the bugid).
Jeremy.
(This used to be commit 93c2d50f1adbf257c0c0185b420a1d73d56be2f9)

20 years agoFix assumption about following directory sep in check_path_syntax(). We
Jeremy Allison [Mon, 8 Mar 2004 21:54:56 +0000 (21:54 +0000)]
Fix assumption about following directory sep in check_path_syntax(). We
need to try and convert 1 byte, then 2 bytes if that fails. Fixes bug
reported by Simo.
Jeremy.
(This used to be commit 0f84801ff3ed5acfcf8e0c4a825f90b9b4823da5)

20 years agoDo some checks about data passed to this function
Simo Sorce [Mon, 8 Mar 2004 10:41:05 +0000 (10:41 +0000)]
Do some checks about data passed to this function
(This used to be commit 77142a1ca6853fcae3b806830d077f6f84bebd6d)

20 years ago2 fixes to enhance readability of source code and debug messages
Simo Sorce [Mon, 8 Mar 2004 09:52:17 +0000 (09:52 +0000)]
2 fixes to enhance readability of source code and debug messages
1 fix for a memleak
(This used to be commit 9f3b0295fe7bd6c0c3a6061e5d00e7b88f702b21)

20 years agoGet us a little closer to Windows LSA semantics.
Volker Lendecke [Sun, 7 Mar 2004 08:23:06 +0000 (08:23 +0000)]
Get us a little closer to Windows LSA semantics.

A windows DC does not reply to DCNAME\\Administrator, only to
DOMAIN\\Administrator. Fix that.

Without winbind we are wrong as domain members, we should forward the request
DOMAIN\\Username to the DC on behalf of the asking client. Winbind fixes that
nicely.

Volker
(This used to be commit c39f698dde98de9b6be40a6c81e669dcd7696b3a)

20 years agoThis might not be used a lot and might not survive for long, but at least it
Volker Lendecke [Sun, 7 Mar 2004 08:17:09 +0000 (08:17 +0000)]
This might not be used a lot and might not survive for long, but at least it
should work as expected :-)

Fix wb_delgrpmember.

Volker
(This used to be commit 2a2b4a159a973678b7279a8d91060c7c27aa22e8)

20 years agoFix typo.
Tim Potter [Sun, 7 Mar 2004 01:14:35 +0000 (01:14 +0000)]
Fix typo.
(This used to be commit 7798a52d82c46759635e90a7e48ddad4ce48b763)

20 years agoEnclose use of fchown() with guards. Bugzilla #1155.
Tim Potter [Sun, 7 Mar 2004 00:34:49 +0000 (00:34 +0000)]
Enclose use of fchown() with guards.  Bugzilla #1155.
(This used to be commit 92f6895dd11189ce966b8b5a3f9ace54f478a375)

20 years agotdbdump doesn't need to #include <sys/mman.h>
Tim Potter [Sat, 6 Mar 2004 23:52:54 +0000 (23:52 +0000)]
tdbdump doesn't need to #include <sys/mman.h>

Bugzilla #1154.
(This used to be commit 311bbf41ec50d5caf4388cb4745173739744a049)

20 years agoSeveral mb tidyups - getting ready to address the XXX_sub function.
Jeremy Allison [Fri, 5 Mar 2004 22:32:43 +0000 (22:32 +0000)]
Several mb tidyups - getting ready to address the XXX_sub function.
Jeremy.
(This used to be commit 13edba472a0a5eb56586458a2432d53f495d0129)

20 years agoBUG 488: fix the 'show client in col 1' button and corrctely enumerate active connections
Gerald Carter [Fri, 5 Mar 2004 18:37:32 +0000 (18:37 +0000)]
BUG 488: fix the 'show client in col 1' button and corrctely enumerate active connections
(This used to be commit f0e454f6eb3ed25c3210f288d48044b3eed9d129)

20 years agofix compiler warning
Gerald Carter [Fri, 5 Mar 2004 17:39:59 +0000 (17:39 +0000)]
fix compiler warning
(This used to be commit 7153cbf8cbb07d4e7a9dc9adc9e0a40c57a6e305)

20 years agoAdd -O (write downloaded files to stdout), based on patch from
Jelmer Vernooij [Fri, 5 Mar 2004 17:21:45 +0000 (17:21 +0000)]
Add -O (write downloaded files to stdout), based on patch from
Bas van Sisseren <bas@dnd.utwente.nl>
(This used to be commit a90df1c170a168092e0c90f684ea968bd1f6f768)

20 years agoall_string_sub() is broken as it doesn't handle mb chars correctly (and
Jeremy Allison [Fri, 5 Mar 2004 01:37:25 +0000 (01:37 +0000)]
all_string_sub() is broken as it doesn't handle mb chars correctly (and
so breaks when substitution '/' and '\'). It's used by unix_clean_name(),
which is used by reduce_name, which is used by check_name() (phew!).
Now that we know all filenames passed to check_name() are in a "good"
format (no double slashes, all '\\' chars translated to '/' etc.) due
to the new check_path_syntax() we can avoid calling reduce_name unless
widelinks are denied. After this check-in I can fix all_string_sub() to
handle mb chars correctly as it won't be in the direct path in the
main path handling code.
Jeremy.
(This used to be commit bce0678331aa4746181389e0f91f11fb2a6dadcb)

20 years agoFix my breakage of NT pipes from the previous patch (sorry). Use the
Jeremy Allison [Thu, 4 Mar 2004 18:55:35 +0000 (18:55 +0000)]
Fix my breakage of NT pipes from the previous patch (sorry). Use the
original srvstr_pull_buf() function to get the pipename not srvstr_get_path().
Jeremy.
(This used to be commit ac5e0c4bb686e2aaccc9b70f240f79747fd48cd8)

20 years agoBUG 1015: patch from jmcd to fix statfs redeclaration of statfs struct on ppc
Gerald Carter [Thu, 4 Mar 2004 18:35:05 +0000 (18:35 +0000)]
BUG 1015: patch from jmcd to fix statfs redeclaration of statfs struct on ppc
(This used to be commit d9a9e214a8dd3b79284f4cff6052210b758bbf72)

20 years agoBUG 1080: fix declaration of SMB_BIG_UINT
Gerald Carter [Thu, 4 Mar 2004 18:17:54 +0000 (18:17 +0000)]
BUG 1080: fix declaration of SMB_BIG_UINT
(This used to be commit 0b17a4105ecbad26b6bb79ed8148495c02518430)

20 years agoThere's a specific error message NT_STATUS_ALIAS_EXISTS.
Volker Lendecke [Thu, 4 Mar 2004 17:59:25 +0000 (17:59 +0000)]
There's a specific error message NT_STATUS_ALIAS_EXISTS.
(This used to be commit 0ad00bce0752373a1ac471f6629a5e64ee5af280)

20 years agoAnother typo, sorry for samba-cvs spam :-)
Volker Lendecke [Thu, 4 Mar 2004 17:50:44 +0000 (17:50 +0000)]
Another typo, sorry for samba-cvs spam :-)
(This used to be commit da59bab769dac3702dbddd6ad718f918befee6db)

20 years agoFix typo.
Volker Lendecke [Thu, 4 Mar 2004 17:47:44 +0000 (17:47 +0000)]
Fix typo.

Volker
(This used to be commit 6287141f10e6c774990b4fdf65bfd2a55afca35a)

20 years agoFix build farm, older compilers won't let you declare variables
Jim McDonough [Thu, 4 Mar 2004 16:24:15 +0000 (16:24 +0000)]
Fix build farm, older compilers won't let you declare variables
right in the middle of the code.

I just love catching jra on stuff like this, after all the crap
I've done. :-)
(This used to be commit 217791cab21b79fdbe2ddb96079fb9abb8545dd7)

20 years agoBUG 848: don't create winbind local users/groups that already exist in the tdb
Gerald Carter [Thu, 4 Mar 2004 16:00:16 +0000 (16:00 +0000)]
BUG 848: don't create winbind local users/groups that already exist in the tdb
(This used to be commit 00c998c5030560d096d7f3c0f9d89ce18e2d006b)

20 years agoanother fix for bug 761; don't default to bsd printing on linux
Gerald Carter [Thu, 4 Mar 2004 15:19:00 +0000 (15:19 +0000)]
another fix for bug 761; don't default to bsd printing on linux
(This used to be commit 29bc83080f47b2f945686e706f2cfef221ac3795)

20 years agoAdded client "hardlink" commant to test doing NT rename with hard links.
Jeremy Allison [Wed, 3 Mar 2004 23:14:21 +0000 (23:14 +0000)]
Added client "hardlink" commant to test doing NT rename with hard links.
Added hardlink_internals() code - UNIX extensions now use this too.
Jeremy.
(This used to be commit 3f2b9f10dec58d3e3ae463e3804d96052fb27a4d)

20 years agoUse a common function to parse all pathnames from the wire. This allows
Jeremy Allison [Wed, 3 Mar 2004 20:55:40 +0000 (20:55 +0000)]
Use a common function to parse all pathnames from the wire. This allows
much closer emulation of Win2k3 error return codes.
Jeremy.
(This used to be commit 883f89a0184e37bff4f5877a25d31b994996ab08)

20 years agomore usrmgr fixes: display lockout timers in minutes, not seconds, for samr 2e
Jim McDonough [Wed, 3 Mar 2004 17:44:10 +0000 (17:44 +0000)]
more usrmgr fixes: display lockout timers in minutes, not seconds, for samr 2e
(This used to be commit 95e7cfdb19bab4a5aac59e10afb3b1416e6079c5)

20 years agoquick for for usrmgr. unknown_6 is really max dimension of logon hours array. need...
Jim McDonough [Wed, 3 Mar 2004 04:23:48 +0000 (04:23 +0000)]
quick for for usrmgr.  unknown_6 is really max dimension of logon hours array.  need to update passdb for this.
(This used to be commit 1d3079bf4c661939e291cca5e96157b5fa492340)

20 years agoBUG 1129: patch from shiro@miraclelinux.com (Shiro Yamada) to install image files...
Gerald Carter [Tue, 2 Mar 2004 18:10:53 +0000 (18:10 +0000)]
BUG 1129: patch from shiro@miraclelinux.com (Shiro Yamada) to install image files for SWAT
(This used to be commit 42d8455a02fa89d37864d32c49d598ba9cdc1552)

20 years agofix typo for callback bit
Jim McDonough [Tue, 2 Mar 2004 18:04:21 +0000 (18:04 +0000)]
fix typo for callback bit
(This used to be commit c1b1a1961f19e2fba680d48e41d0b29cdfd6d39c)

20 years agoLet's be polite with poorer backends ;-)
Simo Sorce [Tue, 2 Mar 2004 15:34:46 +0000 (15:34 +0000)]
Let's be polite with poorer backends ;-)
(This used to be commit 90640a523e9898157a361f3fbf5923b1ef2a6651)

20 years agoThis adds winbind-generated groups showing up in 'getent group'. It is not
Volker Lendecke [Tue, 2 Mar 2004 14:49:06 +0000 (14:49 +0000)]
This adds winbind-generated groups showing up in 'getent group'. It is not
very efficient though, it only does one group at a time. Needs improving, but
the structures are not particularly easy to set up, so check in the basically
working part for others to review.

I'm close to saying that I would like to remove aliases from general group
mapping. These can not be reflected correctly in /etc/group, winbind could do
a better job here.

And having aliases only on machines with nss_winbind at least for me is not a
too severe limitation.

Comments?

Volker
(This used to be commit 6cad5bcc280c2964473346cc467423a44cc6a5c2)

20 years agoallow the 'printing' parameter to be set on a per share basis.
Gerald Carter [Tue, 2 Mar 2004 14:29:01 +0000 (14:29 +0000)]
allow the 'printing' parameter to be set on a per share basis.
The problem was that the current_printif struct was set during
print_backend_init() based on the 'printcap name'.  So you could
not use cups and then override the setting for a specific printer
by setting 'printing = bsd' (a common setup for pdf generation
print services.

There is a subtle change in behavior in that the print
interface functions are selecting on the basis of lp_printing()
and not lp_printcap_name(), but the new behavior seems more
intuitive IMHO.
(This used to be commit e721255e8f7d719dbcc2cad94c9b11f6124676e6)

20 years agoIdra, your privileges patch allowed login only with tdbsam. The problem is
Volker Lendecke [Tue, 2 Mar 2004 14:19:44 +0000 (14:19 +0000)]
Idra, your privileges patch allowed login only with tdbsam. The problem is
that pdb_default_get_privilege_set returns NOT_IMPLEMENTED and not a privilege
set that does not grant anything. I don't really understand privileges yet, so
work around that by not failing if pdb_get_privilege_set fails.

Volker
(This used to be commit b790753f443092a65eeef7b146a18d4c5ffcb323)

20 years agoSorry, forgot to commit an essential piece.
Simo Sorce [Tue, 2 Mar 2004 10:09:52 +0000 (10:09 +0000)]
Sorry, forgot to commit an essential piece.
(This used to be commit fa6500fe773ae1f0aa70f370600b6f7aa7f65f3d)

20 years agoExpand aliases for winbind-generated groups.
Volker Lendecke [Tue, 2 Mar 2004 07:47:39 +0000 (07:47 +0000)]
Expand aliases for winbind-generated groups.

Do:

wbinfo -C alias
net groupmap set alias alias -L
net rpc group addmem alias DOMAIN\\group -S localhost -Uroot%secret
getent group alias

And hopefully the members of domain\\group show up :-)

Still have to get them to show up in 'getent group'.

Volker
(This used to be commit 18e48190838907a29347d471e81945257f540aa7)

20 years agomerging from 3.0
Gerald Carter [Tue, 2 Mar 2004 04:19:47 +0000 (04:19 +0000)]
merging from 3.0
(This used to be commit fae17e0f9d228bab9992287507babd6a8fd53f97)

20 years agoBUG 1147; bad pointer case in get_stored_queue_info() causing seg fault
Gerald Carter [Mon, 1 Mar 2004 17:03:23 +0000 (17:03 +0000)]
BUG 1147; bad pointer case in get_stored_queue_info() causing seg fault
(This used to be commit eb8a8c290f893b6ffa3d16e282829230be56b212)

20 years agoOk here it is my latest work on privileges
Simo Sorce [Mon, 1 Mar 2004 16:10:28 +0000 (16:10 +0000)]
Ok here it is my latest work on privileges

This patch add privilege support for samba
Currently it is implemented only for tdbsam backend but estending it to
other sam backends is straightforward.

I must make a big thank to JFM for his teachings on the matter and the
functions at the base of this work.

At thye moment only samr_create_user honours SeAddUsersPrivilege and
SeMachineAccountPrivilege to permit any user to add machines and/or users to
the server.

The command "net priv" has been provided to manipulate the privileges
database.

There are still many things to do (like support in "net rpc vampire") but
the working core is here.

Feel free to comment/extend on this work.

Of course I will deny that any bug may affect this code :-)
Simo.

This patch adds also my patch about add share command enhancements.
(This used to be commit 7a78c3605e203bd8e0d7ae244605f076a5d0b0bc)

20 years agoFix Tim's fix for #1144. Tim, could you look at that again?
Volker Lendecke [Mon, 1 Mar 2004 14:59:32 +0000 (14:59 +0000)]
Fix Tim's fix for #1144. Tim, could you look at that again?

With only your fix in for example smb.conf was expected in /smb.conf...

Thanks,

Volker
(This used to be commit eb18cb83d13d664896468d200d9dc353da13c561)

20 years agoWhen asked to delete an alias member, don't add it ...
Volker Lendecke [Mon, 1 Mar 2004 13:07:04 +0000 (13:07 +0000)]
When asked to delete an alias member, don't add it ...

Volker
(This used to be commit f95a5d81479b467c837b727831c2224832c8205c)

20 years agoAdd aliases to winbindd_getgroups().
Volker Lendecke [Mon, 1 Mar 2004 13:02:06 +0000 (13:02 +0000)]
Add aliases to winbindd_getgroups().

su - WINDOWS\\vl

now includes the locally defined aliases I'm member of.

Next will be getent group.

Volker
(This used to be commit 52dae45684317ac8ac529017607bb5787dda7c50)

20 years agoFix bugzilla #1144 where running configure --with-fhs=anything would
Tim Potter [Mon, 1 Mar 2004 01:09:13 +0000 (01:09 +0000)]
Fix bugzilla #1144 where running configure --with-fhs=anything would
turn on fhs compliant paths.  Spotted by Timur Bakeyev.
(This used to be commit e0382635a5490e1a6b6388dc98e6ce318e197808)

20 years agoApply my experimental aliases support to HEAD. This will be a bit difficult to
Volker Lendecke [Sun, 29 Feb 2004 16:48:19 +0000 (16:48 +0000)]
Apply my experimental aliases support to HEAD. This will be a bit difficult to
merge to 3_0, as the pdb interfaces has changed a bit between the two.

This has not been tested too severly (which means it's completely broken ;-),
but I want it in for review. Feel free to revert it :-)

TODO:

make 'net groupmap' a bit more friendly for alias members.

Put that stuff into pdb_ldap.

Getting the information over to winbind. One plan without linking pdb into
winbind would be to fill group_mapping.tdb with the membership information and
have that as a cache (or use gencache.tdb?). smbd on a PDC or stand-alone
could trigger that itself, the problem is a BDC using LDAP. This needs to do
it on a regular basis. The BDC smbd needs to be informed about SAM changes
somehow...

Volker
(This used to be commit 30ef8fe1e85c0ca229b54f3f1595c4330f7191d1)

20 years agonet_rpc.c: Don't complain if [add|del]mem was successful.
Volker Lendecke [Sun, 29 Feb 2004 16:33:49 +0000 (16:33 +0000)]
net_rpc.c: Don't complain if [add|del]mem was successful.

srv_samr_nt.c: Correctly report that a user is not member of an alias.

Volker
(This used to be commit 26d99204b7cbfa8e259f2a8438eadc9ff6be0709)

20 years agoTrivial commit to make 'smbdiff 3_0/source head/source' two files smaller.
Volker Lendecke [Sun, 29 Feb 2004 16:32:04 +0000 (16:32 +0000)]
Trivial commit to make 'smbdiff 3_0/source head/source' two files smaller.

Volker
(This used to be commit 73117f5e41aa923b07d200a18c84b8082d8b71a6)

20 years agoPrint an informative error message if trying to add/remove members from
Volker Lendecke [Sun, 29 Feb 2004 12:48:29 +0000 (12:48 +0000)]
Print an informative error message if trying to add/remove members from
something not a group.

Volker
(This used to be commit 9cfc97df456199c22e199831d28597132cf001a8)

20 years agoAdd 'net rpc group [add|del]mem' for domain groups and aliases.
Volker Lendecke [Sat, 28 Feb 2004 18:42:20 +0000 (18:42 +0000)]
Add 'net rpc group [add|del]mem' for domain groups and aliases.

Volker
(This used to be commit 6785dc84ce4d9c2d5ebe3113c7f506947b09a7f8)

20 years agoFix my fix to net rpc group list. We can certainly have more than a single
Volker Lendecke [Sat, 28 Feb 2004 08:19:00 +0000 (08:19 +0000)]
Fix my fix to net rpc group list. We can certainly have more than a single
set of groups.

Volker
(This used to be commit 710969acaa9ce4467ec09c2fadb03e49fbc207be)

20 years agoCan't set allocation size on directories, return correct error code on
Jeremy Allison [Sat, 28 Feb 2004 01:53:19 +0000 (01:53 +0000)]
Can't set allocation size on directories, return correct error code on
fail if file exists and target is a directory. gentest.
Jeremy.
(This used to be commit 4b1262322995c8794cd73d84712f82d8c91abdc6)

20 years agoMore gentest fixes. Fix up regression in IS_NAME_VALID and renames.
Jeremy Allison [Sat, 28 Feb 2004 00:56:39 +0000 (00:56 +0000)]
More gentest fixes. Fix up regression in IS_NAME_VALID and renames.
Jeremy.
(This used to be commit 2a457e2e28cd1f78778cb41fbb381883ced99592)

20 years agoAdded copyrights I forgot about looong ago...
Rafal Szczesniak [Fri, 27 Feb 2004 22:11:31 +0000 (22:11 +0000)]
Added copyrights I forgot about looong ago...

rafal
(This used to be commit ed26b550b5f24741db6be38542f341be18741e62)

20 years agoAdding ability to operate on trust passwords to pdbedit. This enables
Rafal Szczesniak [Fri, 27 Feb 2004 21:02:00 +0000 (21:02 +0000)]
Adding ability to operate on trust passwords to pdbedit. This enables
new functionality and testing interface for new pdb functions.

Also, quite a bit of objects is being added to pdbedit in order to make
it able to find domain sid automatically (if not given explicitly).
If such amount of "wisdom" is not required to be in pdbedit, I'll move
it to 'net' which will have this new functionality, anyway.

rafal
(This used to be commit cfb1b7bda905c8391bf065ecb99bb28806dfe96a)

20 years agoDisabling GUMS (gums_tdbsam2) temporarily, to fix the build.
Rafal Szczesniak [Fri, 27 Feb 2004 20:00:21 +0000 (20:00 +0000)]
Disabling GUMS (gums_tdbsam2) temporarily, to fix the build.

rafal
(This used to be commit 39bc55e4d407adb31030a57185f7431434b43a51)

20 years agoFix for writable printerdata problem - bugzilla #1112.
Tim Potter [Thu, 26 Feb 2004 22:58:18 +0000 (22:58 +0000)]
Fix for writable printerdata problem - bugzilla #1112.
(This used to be commit 892b16404033bbaf72a5a04f558cb41ef544739e)

20 years agoThat const was one too many
Volker Lendecke [Thu, 26 Feb 2004 14:36:28 +0000 (14:36 +0000)]
That const was one too many
(This used to be commit b9ae67a3a232875361d3056eef3b654e6b92c244)

20 years agoImplement 'net groupmap set' and 'net groupmap cleanup'.
Volker Lendecke [Thu, 26 Feb 2004 11:34:33 +0000 (11:34 +0000)]
Implement 'net groupmap set' and 'net groupmap cleanup'.

I was rather annoyed by the net groupmap syntax, I could never get it
right.

net groupmap set "domain admins" domadm

creates a mapping,

net groupmap set "domain admins" -C "Comment" -N "newntname"

should also do what you expect.

net groupmap cleanup

solves a problem I've had two times now: Our SID changed, and a user's primary
group was mapped to a SID that is not ours. net groupmap cleanup removes all
mappings that are not from our domain sid.

Volker
(This used to be commit 69879ceffa587ccf2bf59e1c716424e1d20a7f68)

20 years agoAnd another little const
Volker Lendecke [Thu, 26 Feb 2004 11:08:17 +0000 (11:08 +0000)]
And another little const
(This used to be commit a3a15be5a2ae419992af004425592cca6796edcd)

20 years agoApply some const
Volker Lendecke [Thu, 26 Feb 2004 10:56:41 +0000 (10:56 +0000)]
Apply some const

Volker
(This used to be commit f1b66461ebce4e89eb65620a09c079ae9697537b)

20 years agoInteresting fact found by IFSTEST /t LockOverlappedTest...
Jeremy Allison [Thu, 26 Feb 2004 01:30:56 +0000 (01:30 +0000)]
Interesting fact found by IFSTEST /t LockOverlappedTest...
Even if it's our own lock context, we need to wait here as
there may be an unlock on the way.
So I removed a "&& !my_lock_ctx" from the following
if statement.

if ((lock_timeout != 0) && lp_blocking_locks(SNUM(conn)) && ERROR_WAS_LOCK_DENIED(status)) {

Jeremy.
(This used to be commit 17c88758ae82b20bc7260d5d927325f3f73ba33c)

20 years ago(merge from 3.0)
Andrew Bartlett [Wed, 25 Feb 2004 23:19:17 +0000 (23:19 +0000)]
(merge from 3.0)

Fix bug in previous global_sam_sid() commit.  I broke the 'read from
MACHINE.SID' file functionality.

Also, before we print out the results of 'net getlocalsid' and 'net
getdomainsid', ensure we have tried to read that file, or have
generated one.

Andrew Bartlett
(This used to be commit af1b6447b8292a83851361570219ee6d889e0898)

20 years agoAdds some more tests of renaming an open file that has been opened with
Richard Sharpe [Wed, 25 Feb 2004 22:14:35 +0000 (22:14 +0000)]
Adds some more tests of renaming an open file that has been opened with
different share modes. It also has a commented out test to see if we can
actually open a renamed file, and it turns out that we can, it seems. I am
not sure at this stage how long that is the case for, though.
(This used to be commit 89d810d234f53c9731ded85848bd9c17d45d5125)

20 years ago(merge from 3.0)
Andrew Bartlett [Wed, 25 Feb 2004 22:09:46 +0000 (22:09 +0000)]
(merge from 3.0)

I *hate* global variables...

OK, what was happening here was that we would invalidate global_sam_sid
when we set the sid into secrets.tdb, to force a re-read.

The problem was, we would do *two* writes into the TDB, and the second one
(in the PDC/BDC case) would be of a NULL pointer.  This caused smbd startups
to fail, on a blank TDB.

By using a local variable in the pdb_generate_sam_sid() code, we avoid this
particular trap.

I've also added better debugging for the case where this all matters, which
is particularly for LDAP, where it finds out a domain SID from the sambaDomain
object.

Andrew Bartlett
(This used to be commit f3ecdea56d9ea6d562ace84f0e653a641eb96f6e)

20 years agoFixup strange rename error case (gentest).
Jeremy Allison [Wed, 25 Feb 2004 21:37:09 +0000 (21:37 +0000)]
Fixup strange rename error case (gentest).
Jeremy.
(This used to be commit e46aaffe97919afb1c92f56376f9578825012b92)

20 years agoDo the query part of the previous fix...reset time and duration are set in minutes...
Jim McDonough [Wed, 25 Feb 2004 20:02:41 +0000 (20:02 +0000)]
Do the query part of the previous fix...reset time and duration are set in minutes, not seconds.  Works from usrmgr.
(This used to be commit d02dd0e5f5fae3256b1922c2963e18c8fa36a3e6)

20 years agoreset time and duration are set in minutes, not seconds. Works from usrmgr.
Jim McDonough [Wed, 25 Feb 2004 15:01:38 +0000 (15:01 +0000)]
reset time and duration are set in minutes, not seconds.  Works from usrmgr.
(This used to be commit 08a7c9697d49719e4cfb32a06720873c98585f67)

20 years agoFigured out a new flags bit with gentest and ethereal....
Jeremy Allison [Wed, 25 Feb 2004 02:15:20 +0000 (02:15 +0000)]
Figured out a new flags bit with gentest and ethereal....
Jeremy.
(This used to be commit 755b66303d04b73a855fa8db5fe3ae920a901bf3)

20 years agoMore gentest fun :-). NB. I'm not fixing OpenX breakage 'cos if you look
Jeremy Allison [Wed, 25 Feb 2004 01:34:58 +0000 (01:34 +0000)]
More gentest fun :-). NB. I'm not fixing OpenX breakage 'cos if you look
at what W2K3 accepts here it's COMPLETELY BROKEN ! :-).
Jeremy.
(This used to be commit 9aa37cb84090260b33d32ad123ddc4d211e3913b)

20 years agoMore gentest fixes.
Jeremy Allison [Wed, 25 Feb 2004 00:48:17 +0000 (00:48 +0000)]
More gentest fixes.
Jeremy.
(This used to be commit fc9811693933327a15b7dbe4893219c7ef44d1e8)

20 years agoAdd 'net rpc group add'. For this parse_samr.c had to be changed: The
Volker Lendecke [Tue, 24 Feb 2004 18:03:19 +0000 (18:03 +0000)]
Add 'net rpc group add'. For this parse_samr.c had to be changed: The
group_info4 in set_dom_group_info also has the level in the record
itself. This seems not to be an align. Tested with NT4 usrmgr.exe. It can
still create a domain group on a samba machine.

Volker
(This used to be commit 9cadd14aa53d390a2419d7ce4fe48d58cf372279)