16 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)

16 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).
(This used to be commit 93c2d50f1adbf257c0c0185b420a1d73d56be2f9)

16 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.
(This used to be commit 0f84801ff3ed5acfcf8e0c4a825f90b9b4823da5)

16 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)

16 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)

16 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

(This used to be commit c39f698dde98de9b6be40a6c81e669dcd7696b3a)

16 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.

(This used to be commit 2a2b4a159a973678b7279a8d91060c7c27aa22e8)

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

16 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)

16 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)

16 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.
(This used to be commit 13edba472a0a5eb56586458a2432d53f495d0129)

16 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)

16 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)

16 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 <>
(This used to be commit a90df1c170a168092e0c90f684ea968bd1f6f768)

16 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.
(This used to be commit bce0678331aa4746181389e0f91f11fb2a6dadcb)

16 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().
(This used to be commit ac5e0c4bb686e2aaccc9b70f240f79747fd48cd8)

16 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)

16 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)

16 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)

16 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)

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

(This used to be commit 6287141f10e6c774990b4fdf65bfd2a55afca35a)

16 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)

16 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)

16 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)

16 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.
(This used to be commit 3f2b9f10dec58d3e3ae463e3804d96052fb27a4d)

16 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.
(This used to be commit 883f89a0184e37bff4f5877a25d31b994996ab08)

16 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)

16 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)

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

16 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)

16 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)

16 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.


(This used to be commit 6cad5bcc280c2964473346cc467423a44cc6a5c2)

16 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)

16 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.

(This used to be commit b790753f443092a65eeef7b146a18d4c5ffcb323)

16 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)

16 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.


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'.

(This used to be commit 18e48190838907a29347d471e81945257f540aa7)

16 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)

16 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)

16 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

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 :-)

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

16 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...


(This used to be commit eb18cb83d13d664896468d200d9dc353da13c561)

16 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 ...

(This used to be commit f95a5d81479b467c837b727831c2224832c8205c)

16 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.

(This used to be commit 52dae45684317ac8ac529017607bb5787dda7c50)

16 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)

16 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 :-)


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

(This used to be commit 30ef8fe1e85c0ca229b54f3f1595c4330f7191d1)

16 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.

(This used to be commit 26d99204b7cbfa8e259f2a8438eadc9ff6be0709)

16 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.

(This used to be commit 73117f5e41aa923b07d200a18c84b8082d8b71a6)

16 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.

(This used to be commit 9cfc97df456199c22e199831d28597132cf001a8)

16 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.

(This used to be commit 6785dc84ce4d9c2d5ebe3113c7f506947b09a7f8)

16 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.

(This used to be commit 710969acaa9ce4467ec09c2fadb03e49fbc207be)

16 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.
(This used to be commit 4b1262322995c8794cd73d84712f82d8c91abdc6)

16 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.
(This used to be commit 2a457e2e28cd1f78778cb41fbb381883ced99592)

16 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...

(This used to be commit ed26b550b5f24741db6be38542f341be18741e62)

16 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.

(This used to be commit cfb1b7bda905c8391bf065ecb99bb28806dfe96a)

16 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.

(This used to be commit 39bc55e4d407adb31030a57185f7431434b43a51)

16 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)

16 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)

16 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

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.

(This used to be commit 69879ceffa587ccf2bf59e1c716424e1d20a7f68)

16 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)

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

(This used to be commit f1b66461ebce4e89eb65620a09c079ae9697537b)

16 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)) {

(This used to be commit 17c88758ae82b20bc7260d5d927325f3f73ba33c)

16 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)

16 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)

16 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

Andrew Bartlett
(This used to be commit f3ecdea56d9ea6d562ace84f0e653a641eb96f6e)

16 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).
(This used to be commit e46aaffe97919afb1c92f56376f9578825012b92)

16 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)

16 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)

16 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....
(This used to be commit 755b66303d04b73a855fa8db5fe3ae920a901bf3)

16 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 ! :-).
(This used to be commit 9aa37cb84090260b33d32ad123ddc4d211e3913b)

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

16 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.

(This used to be commit 9cadd14aa53d390a2419d7ce4fe48d58cf372279)

16 years agoRemove unused variable.
Volker Lendecke [Tue, 24 Feb 2004 17:29:06 +0000 (17:29 +0000)]
Remove unused variable.

(This used to be commit f5af0326e67c0eb7be6f4b07f8b89c4c680903ac)

16 years ago'net idmap restore' is too useful to be left broken :-)
Volker Lendecke [Tue, 24 Feb 2004 15:46:18 +0000 (15:46 +0000)]
'net idmap restore' is too useful to be left broken :-)

Set the HWM values correctly after having manipulated the tdb.

(This used to be commit efad125f40858176145c69265d06b25295292132)

16 years agoEnsure '.' and '..' don't match in delete requests.
Jeremy Allison [Tue, 24 Feb 2004 01:45:56 +0000 (01:45 +0000)]
Ensure '.' and '..' don't match in delete requests.
(This used to be commit c85b617aa03c1524f659100030a8e96cef38fb62)

16 years agoMore gentest error fixups.
Jeremy Allison [Tue, 24 Feb 2004 00:54:43 +0000 (00:54 +0000)]
More gentest error fixups.
(This used to be commit f353cafa9d9e6142b4aec45cfbc567dc4ab20d7e)

16 years agoFixup bad-path error found by gentest.
Jeremy Allison [Tue, 24 Feb 2004 00:38:24 +0000 (00:38 +0000)]
Fixup bad-path error found by gentest.
(This used to be commit 55f13d743e78ed8f48bf209e838ea77df3121047)

16 years agoAdded NTrename SMB (0xA5) - how did we miss this.... ?
Jeremy Allison [Tue, 24 Feb 2004 00:05:49 +0000 (00:05 +0000)]
Added NTrename SMB (0xA5) - how did we miss this.... ?
(This used to be commit d236372876918be2a886a89383cf843b82d4c8db)

16 years agoFixup correct timeout values for blocking lock timeouts (tested at connectathon
Jeremy Allison [Tue, 24 Feb 2004 00:02:58 +0000 (00:02 +0000)]
Fixup correct timeout values for blocking lock timeouts (tested at connectathon
by Herb).
(This used to be commit 6356b792683100122500db9cf222b7e8518d834e)

16 years ago(merge from 3.0)
Andrew Bartlett [Mon, 23 Feb 2004 21:10:16 +0000 (21:10 +0000)]
(merge from 3.0)

Found by Fabien Chevalier <> and
JustFillBug <> on the Samba lists - a 'max
password age' of zero should be considered as 'never expire'.

For the timebeing we just set it like -1, but we might revisit this
for closer-to-ms behaviour.

Andrew Bartlett
(This used to be commit 2003cdc65e1b9f6514d97334997fee5c49813bac)

16 years agoFix "unable to initialize" bug when smbd hasn't been run with
Jeremy Allison [Mon, 23 Feb 2004 20:12:15 +0000 (20:12 +0000)]
Fix "unable to initialize" bug when smbd hasn't been run with
new system and a user is being added via pdbedit/smbpasswd.
Found at Connectathon setup.
(This used to be commit 93580927dc255f205283b64c72fb95be990d2216)

16 years agoAdd bad password count/time attributes
Jim McDonough [Mon, 23 Feb 2004 02:47:27 +0000 (02:47 +0000)]
Add bad password count/time attributes
(This used to be commit 2fa56111d37a09702b31e1769a687b630aff1c1b)

16 years agoAdd bad password count/time attributes
Jim McDonough [Sun, 22 Feb 2004 20:25:39 +0000 (20:25 +0000)]
Add bad password count/time attributes
(This used to be commit 51a8d050e9242192c2670b09242cf4fdbbae8940)

16 years agoAdd calls to password lockout functions. Should now work against tdbsam only.
Jim McDonough [Sat, 21 Feb 2004 17:41:32 +0000 (17:41 +0000)]
Add calls to password lockout functions.  Should now work against tdbsam only.
(This used to be commit 6ccb90acfd8591f6ef0d91b4ada89c5ad8ac98d5)

16 years agoprintf -> d_printf
Tim Potter [Sat, 21 Feb 2004 00:27:30 +0000 (00:27 +0000)]
printf -> d_printf
(This used to be commit 3f3a744e925aa943c901406f1565ebf346fe8707)

16 years agoMake SMB_FILE_ACCESS_INFORMATION call work correctly.
Jeremy Allison [Fri, 20 Feb 2004 23:19:36 +0000 (23:19 +0000)]
Make SMB_FILE_ACCESS_INFORMATION call work correctly.
(This used to be commit a6cb7af9bad1610e802fa5cddbf68fb887bc2974)

16 years agoMake us bug-for-bug compatible with W2K3 - to get delete on close semantics
Jeremy Allison [Fri, 20 Feb 2004 22:45:49 +0000 (22:45 +0000)]
Make us bug-for-bug compatible with W2K3 - to get delete on close semantics
on an initial open the desired_access field *must* contain DELETE_ACCESS,
simply having it map from a GENERIC_ALL won't do. Fixes delete on close test.
(This used to be commit fb4249e7d12bee4589edff40f1e76f1a19a6ffaa)

16 years agoAIX has already has a function called msleep(). Bugzilla #1098.
Tim Potter [Fri, 20 Feb 2004 22:42:39 +0000 (22:42 +0000)]
AIX has already has a function called msleep().  Bugzilla #1098.
(This used to be commit 90ae3667448be9b3445f401bcd9d7e3eba374215)

16 years agohandle both 0 and -1 as disabling
Jim McDonough [Fri, 20 Feb 2004 16:00:42 +0000 (16:00 +0000)]
handle both 0 and -1 as disabling
reset count and lockout duration
(This used to be commit ad2996e418a45c1cf4f969077ffc267de70d6866)

16 years agoMake default lockout duration and
Jim McDonough [Fri, 20 Feb 2004 15:59:10 +0000 (15:59 +0000)]
Make default lockout duration and
reset count time 30 minutes, to match windows, and also be valid (0 was invalid)
(This used to be commit 69924079b2f7098254c2053781121d4324626dee)

16 years ago<attr/xattr.h> & <sys/xattr.h> are mutually exclusive it seems; fix build on SuSE 8.2
Gerald Carter [Fri, 20 Feb 2004 15:53:26 +0000 (15:53 +0000)]
<attr/xattr.h> & <sys/xattr.h> are mutually exclusive it seems; fix build on SuSE 8.2
(This used to be commit bf271b96cf6bc42c8a23309d890febf003e1627f)

16 years agoFixup returns from lookupsids in the same way as lookupnames. Inspired by
Jeremy Allison [Thu, 19 Feb 2004 23:01:52 +0000 (23:01 +0000)]
Fixup returns from lookupsids in the same way as lookupnames. Inspired by
Volkers patch.
(This used to be commit aff6bacf0e461322e6e165cb7a6a42f4d976f52b)

16 years agocheck for <sys/xattr.h>; needed by Debian testing
Gerald Carter [Thu, 19 Feb 2004 21:56:49 +0000 (21:56 +0000)]
check for <sys/xattr.h>; needed by Debian testing
(This used to be commit fb90b4140ec45ff4088c41dffce3680b5c4dc170)

16 years agoremove some unused local variables
Gerald Carter [Thu, 19 Feb 2004 21:55:45 +0000 (21:55 +0000)]
remove some unused local variables
(This used to be commit aa67c77515097cc21a9de727bf3722c04de313f9)

16 years agoEnable checking/resetting of account lockout and bad password based on policy
Jim McDonough [Thu, 19 Feb 2004 21:41:03 +0000 (21:41 +0000)]
Enable checking/resetting of account lockout and bad password based on policy
(This used to be commit caef425d803fa01aa6f54339f8bc17fc752f73b0)

16 years agoClean up bad pw count and autolock flag update fn()s
Jim McDonough [Thu, 19 Feb 2004 21:37:53 +0000 (21:37 +0000)]
Clean up bad pw count and autolock flag update fn()s
(This used to be commit 81dc9d53eb330f350f3f31068fe75c3606221e62)

16 years agocomment out server portion of DsEnumerateDomainTrusts() since it causes 2k/xp clients...
Gerald Carter [Thu, 19 Feb 2004 19:35:48 +0000 (19:35 +0000)]
comment out server portion of DsEnumerateDomainTrusts() since it causes 2k/xp clients to fail to join the domain (see comments in srv_netlog_nt.c for details)
(This used to be commit 981bd70a56094740daf6d144f7b802370c0d9056)

16 years agoAdd bad pw count and autolock flag update fn()s
Jim McDonough [Thu, 19 Feb 2004 18:35:46 +0000 (18:35 +0000)]
Add bad pw count and autolock flag update fn()s
(This used to be commit 91ea29b392ff05311e9631467ee6255b29887e04)

16 years agofixing error in logic when checking flags changed field on user primary group sid
Gerald Carter [Thu, 19 Feb 2004 17:33:28 +0000 (17:33 +0000)]
fixing error in logic when checking flags changed field on user primary group sid
(This used to be commit c275d8f831490a52bae11698349a6b795d12f924)

16 years agomerging smbmnt fix from 3.0
Gerald Carter [Thu, 19 Feb 2004 16:48:16 +0000 (16:48 +0000)]
merging smbmnt fix from 3.0
(This used to be commit ea83c341c9ff54dfc5d0a941be96e6684f565d7d)

16 years agoAdd bad password reset and display of bad password count/time
Jim McDonough [Thu, 19 Feb 2004 16:00:33 +0000 (16:00 +0000)]
Add bad password reset and display of bad password count/time
(This used to be commit 22c312b31d545914ae3fd12a11915ed046421f38)

16 years agoAdd functions to get/set bad password time
Jim McDonough [Thu, 19 Feb 2004 15:59:30 +0000 (15:59 +0000)]
Add functions to get/set bad password time
(This used to be commit 0a2b792556b3aaa056a1fa6adb35627fdb804758)