1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

13696 Commits

Author SHA1 Message Date
Jeremy Allison
f16c79732e Fix reply_ctemp - make compatible with w2k3.
Jeremy.
(This used to be commit ddb40a6b1c)
2004-04-02 22:11:08 +00:00
Jeremy Allison
becfb420f7 Fix wildcard identical rename.
Jeremy.
(This used to be commit 610ae1126e)
2004-04-02 19:51:27 +00:00
Jeremy Allison
ff469fb2b2 check_path improvements found by samba4 raw-checkpath tests.
Jeremy.
(This used to be commit 4081f7ce51)
2004-04-02 19:05:57 +00:00
Jeremy Allison
722aa118c6 Added per-share parameter "store dos attributes". When set, will store
dos attributes in an EA. Based on an original patch from tridge, but
modified somewhat to cover all cases.
Jeremy.
(This used to be commit ed653cd468)
2004-04-02 18:46:19 +00:00
Volker Lendecke
044c6f513d Implement NETLOGON GetDCName client side. You can ask a DC for the name of
a DC it trusts.

Volker
(This used to be commit ae6840320f)
2004-04-02 12:56:18 +00:00
Steve French
620e1eaddc Fix credential file mountinf for cifs vfs
(This used to be commit 9ad22b8a3d)
2004-04-02 00:11:27 +00:00
Jeremy Allison
fe160f5b72 "Fixing my FORTRAN". Ensure we always have some valid char converter for the
neccessary types before we will run at all. If we can't get one, use ASCII
but complain mightily.
Jeremy.
(This used to be commit 37dd5e52f6)
2004-04-01 19:42:36 +00:00
Gerald Carter
2197bd26ac BUG 1023: surround get_group_from_gid() with become_unbecome_root() block
(This used to be commit 1aeeb432c7)
2004-04-01 15:15:13 +00:00
Volker Lendecke
56e7c149ba This restructures lib/afs.c so that the token data can be but into a
stream. This is to implement wbinfo -k that asks winbind for authentication
which then creates the AFS token for the authenticated user.

Volker
(This used to be commit 2df6750a07)
2004-04-01 12:31:50 +00:00
Volker Lendecke
e2f355c7ea Cosmetic: Fix a const warning.
Volker
(This used to be commit c814f7c43d)
2004-04-01 08:54:01 +00:00
Jeremy Allison
e869727420 Reformat in preparation for EA dosmode attributes.
Jeremy
(This used to be commit de2f149e9e)
2004-03-31 22:46:15 +00:00
Herb Lewis
70227784ba fix typo
(This used to be commit 4b737b51a5)
2004-03-31 20:24:10 +00:00
Volker Lendecke
95bd9b5ab0 Apply some const
(This used to be commit aa220cffa7)
2004-03-31 15:21:48 +00:00
Volker Lendecke
9d1a4e8013 Remove some unused code
(This used to be commit 2b757b6adf)
2004-03-31 14:36:25 +00:00
Jeremy Allison
d113219e78 Added support for OS/2 EA's in smbd server. Test with smbtorture eatest.
New protocol option "ea support" to turn them on (off by default). Conrad
at Apple may like this as it allows MacOS resource forks to be stored on
a file. Passes valgrind. Documentation to follow.
Jeremy.
(This used to be commit 8cc10a6c05)
2004-03-31 02:20:16 +00:00
Jeremy Allison
a1994d1c96 Ensure we cope correctly with ea length of zero. Detect torture fail correctly.
Jeremy.
(This used to be commit 43db249fb8)
2004-03-30 18:38:21 +00:00
Volker Lendecke
62ae6e36f0 Merge a fix from HEAD to 3_0
Volker
(This used to be commit 6bc88d91e5)
2004-03-30 08:11:59 +00:00
Volker Lendecke
97b200d422 Apply some const
(This used to be commit 8037750df5)
2004-03-30 08:03:32 +00:00
Jeremy Allison
1a643a6fe9 Committed test code by mistake... removing.
Jeremy.
(This used to be commit 73433dc349)
2004-03-29 23:42:48 +00:00
Jeremy Allison
578d715755 Setting EA's to zero length deletes them.
Jeremy.
(This used to be commit 01fb871762)
2004-03-29 23:39:13 +00:00
Jeremy Allison
099974aa15 Fix get/set of EA's in client library. Added torture test for it.
Jeremy.
(This used to be commit 0d239a9c07)
2004-03-29 22:21:47 +00:00
Volker Lendecke
4ee66eb4c3 Without words...
(This used to be commit 9cb6b10efa)
2004-03-29 11:54:34 +00:00
Volker Lendecke
f6d86af4a2 Some fixes to expand_msdfs module.
Volker
(This used to be commit 558b5bc1d8)
2004-03-29 11:40:43 +00:00
Andrew Tridgell
fb53eff3e1 merge tdb changes from samba4 - this means tdb is now under the LGPL, as discussed and agreed previously
(This used to be commit 9d1a08d65c)
2004-03-28 02:19:58 +00:00
Andrew Bartlett
7c2b0d536b Let the comment match the function...
Andrew Bartlett
(This used to be commit 43c71b3202)
2004-03-27 10:32:59 +00:00
Andrew Bartlett
b65d7d59c2 Revert bogus part of smb signing commit - when Win2k supports singing/SPNEGO,
it does sign the first packet.

Andrew Bartlett
(This used to be commit 4b9c50db85)
2004-03-27 08:51:04 +00:00
Andrew Bartlett
63f5167a28 Add a few comments explaining KEY_EXCH
Andrew Bartlett
(This used to be commit e5422d7413)
2004-03-27 08:43:09 +00:00
Andrew Bartlett
873db3f5fd Based on the detective work of Jianliang Lu <j.lu@tiesse.com>, allow yet
another NTLMv2 combination.

We should allow the NTLMv2 response to be calculated with either the domain
as supplied, or the domain in UPPER case (as we always did in the past).

As a client, we always UPPER case it (as per the spec), but we also
make sure to UPPER case the domain, when we send it.  This should give
us maximum compatability.

Andrew Bartlett
(This used to be commit 1e91cd0cf8)
2004-03-27 07:53:47 +00:00
Andrew Bartlett
6dbd02d056 Make it clearer that this error refers to the peer, as this code is in both
the client and server.

Andrew Bartlett
(This used to be commit 414d3fdc75)
2004-03-27 07:51:31 +00:00
Andrew Bartlett
e9a7e67e01 Merge from HEAD the SMB signing patch that I developed a couple of weeks
ago.

This patch re-adds support for 'optional' SMB signing.  It also ensures that
we are much more careful about when we enable signing, particularly with
on-the-fly smb.conf reloads.

The client code will now attempt to use smb signing by default, and disable
it if the server doesn't correctly support it.

Andrew Bartlett
(This used to be commit e27b5cbe75)
2004-03-27 07:33:59 +00:00
Andrew Bartlett
59572d1297 Ensure we correctly set cli->nt_pipe_fnum on failure to correctly open the
NT session.

Andrew Bartlett
(This used to be commit 01fff20e6e)
2004-03-27 05:39:19 +00:00
Andrew Bartlett
deee8fae47 As I raised (without objection) on the mailing list a while back, this
patch removes the 'unicode' smb.conf option.

Clients are as always free not to negotiate unicode, but Samba will always
accept unicode in smbd.

Setting 'unicode = no' caused me more client BSODs than any other option
I have seen, and I really want to protect some of our more silly users, who
will, no matter what, select and change every option...

Andrew Bartlett
(This used to be commit 3f9177bd5d)
2004-03-27 05:38:20 +00:00
Jeremy Allison
651d5b4683 Working (tested) client code for setting EA's by filename and fnum.
Now for parsing out the retrieved EA's.
Jeremy.
(This used to be commit 5eeeee302c)
2004-03-27 02:13:58 +00:00
Jeremy Allison
8d6aee954a Fix bug #1211. Ensure accept socket is in non-blocking state in case of network
error after select() returns true. (See accept man page on Linux). Patch from
rabies@meep.org (Richard Garnish).
Jeremy.
(This used to be commit 6ca158291c)
2004-03-26 23:02:53 +00:00
Volker Lendecke
87280e9a79 Move the Client-IP based msdfs target expansion to a VFS module.
Volker
(This used to be commit 9cb6a4d76f)
2004-03-26 22:26:33 +00:00
Jeremy Allison
1a50cf19d0 Always use strchr_m, not strchr on unix character sets.
Jeremy.
(This used to be commit 8431b985d6)
2004-03-26 20:40:30 +00:00
Volker Lendecke
950f0f84a5 After briefly talking to jerry, commit this:
Redirect clients to shares based on the the client's IP address. The msdfs
link has the following form:

temp1 -> msdfs:@/data/tmp/redir@\temp

The file /data/tmp/redir has the contents:

192.168.234.128 closest
192.168.234 close
        default

Everything in between the @-signs in the link target is replaced by the
substituion in the file.

Jerry, errors in the filename expansion are now answered with
NT_STATUS_OBJECT_NAME_NOT_FOUND

Volker
(This used to be commit 8e237d533e)
2004-03-26 17:58:30 +00:00
Gerald Carter
bfa1b2a8bd source code fix for bug 1095 -- honor the '-l' option
(This used to be commit ab48af6993)
2004-03-26 15:40:06 +00:00
Jim McDonough
2732b702fb Use timegm, or our already existing replacement instead of timezone, as
some platforms (FreeBSD in this case) don't define timezone according to
posix.  This is what I wanted to do anyway.

Spotted by Andrzej Tobola <san@iem.pw.edu.pl>
(This used to be commit bc13e35db0)
2004-03-25 18:25:41 +00:00
Gerald Carter
073d1c1964 jra's patch -- fix anonymous self referral code to check that a share is an msdfs root first
(This used to be commit 641c2acd92)
2004-03-25 14:41:56 +00:00
Tim Potter
7850250445 Path for bugzilla #1152 from Timur Bakeyev. Allow python modules to
build despite libraries added to LDFLAGS instead of LDPATH.
(This used to be commit 98a25dcda8)
2004-03-24 23:52:11 +00:00
Gerald Carter
cc98a35689 fixes for prnadmin.dll API
* force the PRINTER_ATTRIBUTE_LOCAL (nor PRINTER_ATTRIBUTE_NETWORK)
  * ensure that we return the sec_desc in smb_io_printer_info_2
    (allows prnui.dll to restore security descriptors from a data file).
(This used to be commit c335cb80d2)
2004-03-24 19:15:17 +00:00
Jim McDonough
9a8e30d04b Fix bugzilla # 1208
Winbind tickets expired.  We now check the expiration time, and acquire
new tickets.  We couln't rely on renewing them, because if we didn't get
a request before they expired, we wouldn't have renewed them.  Also, there
is a one-week limit in MS on renewal life, so new tickets would have been
needed after a week anyway.   Default is 10 hours, so we should only be
acquiring them that often, unless the configuration on the DC is changed (and
the minimum is 1 hour).
(This used to be commit c2436c433a)
2004-03-24 17:32:55 +00:00
Jeremy Allison
90f64838f4 Added cli_set_ea(), cli_get_ea next...
Jeremy.
(This used to be commit b0c109c403)
2004-03-24 03:48:08 +00:00
Gerald Carter
f2e853d345 remove unused variable
(This used to be commit 170c443b19)
2004-03-22 23:05:02 +00:00
Gerald Carter
e9e03e9900 missed one on BUG 1195; make sure to set the private * to NULL
(This used to be commit 97a24d1389)
2004-03-22 22:57:21 +00:00
Gerald Carter
63f8fe3d49 BUG 1185: use 'winbind cache time' as the reconnect period when seq_num == -1 rather than multiplying it by 8 (the default cache time is 5 minutes now)
(This used to be commit 8d6e370313)
2004-03-22 22:50:27 +00:00
Gerald Carter
14dd75d181 bug 1195: add flag to ADS_STRUCT so we know who owns the main structure's memory (not the members though)
(This used to be commit 4449e0e251)
2004-03-22 22:49:40 +00:00
Andrew Bartlett
f58e6a9977 Given how often a panic has to do with malloc() problems, don't tempt
things more by calling SAFE_FREE() just before we exit our panic handler.

Andrew Bartlett
(This used to be commit d0b820562b)
2004-03-21 08:43:41 +00:00
Jeremy Allison
7cea655424 Fix for #1064 - ensure truncate attribute checking is done correctly on "hidden" dot files.
Jeremy.
(This used to be commit a6045c904f)
2004-03-19 23:46:48 +00:00
Gerald Carter
c24dccd413 BUG 417: fix %UuGg variables expansion in include lines setging the current_user_info struct in register_vuid() -- shouldn't be any more broken than we were
(This used to be commit a90c3bd281)
2004-03-19 22:06:54 +00:00
Gerald Carter
fd312721ea missed some of Derrel's changes
(This used to be commit 3aac1e549e)
2004-03-19 17:48:08 +00:00
Gerald Carter
03992127fa add --with-libdir and --with-mandir (patch from Guenther Deschner)
(This used to be commit a1d6200cd5)
2004-03-19 16:58:16 +00:00
Gerald Carter
45355a1e84 bumping version to 3.0.3pre2
(This used to be commit 54de604054)
2004-03-19 16:23:54 +00:00
Gerald Carter
56ce613679 updating release notes & merging Derrel Lipman's libsmbclient patch from HEAD
(This used to be commit 5fbfaa687a)
2004-03-19 16:22:47 +00:00
Simo Sorce
ebf27cf5a1 backport from head
(This used to be commit e05eb14370)
2004-03-19 11:28:36 +00:00
Jeremy Allison
a79b205d92 Fix gcc warnings. Fix mkproto with new type.
Jeremy.
(This used to be commit 00fa66df3e)
2004-03-19 01:29:14 +00:00
Jeremy Allison
7942c2826b Merge from HEAD for Amanda group.
Apply Craig Barratt's fixes to allow multiple exlusion files and patterns.
Jeremy.
(This used to be commit 0272fac8ca)
2004-03-18 23:45:15 +00:00
Jim McDonough
357998ddbd Password lockout for LDAP backend. Caches autolock flag, bad count, and
bad time locally, updating the directory only for hitting the policy limit
or resetting.

This needed to be done at the passdb level rather than auth, because some
of the functions need to be supported from tools such as pdbedit.  It was
done at the LDAP backend level instead of generically after discussion,
because of the complexity of inserting it at a higher level.

The login cache read/write/delete is outside of the ldap backend, so it could
easily be called by other backends.  tdbsam won't call it for obvious
reasons, and authors of other backends need to decide if they want to
implement it.
(This used to be commit 2a679cbc87)
2004-03-18 19:22:51 +00:00
Gerald Carter
5d40499b9f BUG 932: ulrich@holeschak.de (Ulrich Holeschak); fix local password change using pam_smbpass
(This used to be commit f21182e24f)
2004-03-18 18:09:59 +00:00
Jeremy Allison
c66f52a5ac Correctness patch from fumiya@miraclelinux.com to count characters correctly,
doesn't affect what got put on the wire.
Jeremy.
(This used to be commit e8b68ef965)
2004-03-18 17:58:50 +00:00
Volker Lendecke
60a237b0b5 Fix sambaUserWorkstations for network samlogons against us as DC. Strip
the \\ off the workstation.

Volker
(This used to be commit d01cb00aad)
2004-03-18 07:36:36 +00:00
Volker Lendecke
ef4a7b3c40 Two little annoyances:
net rpc did not inform you if no smbd is running.

I never liked the error message (!) Success! when we established a trust.

Volker
(This used to be commit 4191a434d4)
2004-03-18 07:32:15 +00:00
Jeremy Allison
7e799b3036 Added a varient of Volker's patch to fix the "self-referrals as anonymous user"
problem.
Jeremy.
(This used to be commit 74de9a6140)
2004-03-18 02:17:23 +00:00
Jeremy Allison
41ea0d35ae Remove excess logging when probing for the length of the next mb char.
Jeremy.
(This used to be commit 6339c4690a)
2004-03-17 19:23:48 +00:00
Gerald Carter
aad3d8aeb0 asu/syntax/pc_netlink doesn't fill in the pipe name in the rpc_bind response so dont check for it
(This used to be commit 4d68d3d5dd)
2004-03-17 17:38:38 +00:00
Jeremy Allison
aa2e306a01 Change check_path_syntax() to use the new next_mb_char_size() function
to make it generic. Remove the mb-codepage "blacklist". Alexander, please
check this fix as it reverts your blacklist changes, but I'm hoping it
fixes the problem in a more generic way for all charsets. I'm not trying
to trample on your (excellent!) work here, just make things more generic
without special cases.
Jeremy.
(This used to be commit 5a9324525a)
2004-03-17 02:08:31 +00:00
Jeremy Allison
acad182a3f Add function next_mb_char_size() that returns a size_t of the number of
bytes in the mb character at a pointer. Will be useful in fixing check_path_syntax()
to not use a "blacklist". Also re-added my (C) to reply.c. I mean, really - I've
been adding code to the file for over 10 years and I recognise many of the
fuctions as mine ! :-).
Jeremy.
(This used to be commit d2b2a39fd2)
2004-03-16 21:59:11 +00:00
Gerald Carter
c340b2e5e4 fix overlapping memory bug when copying username
(This used to be commit a7cac639c2)
2004-03-16 20:28:47 +00:00
Gerald Carter
9073c95b97 BUG 979 -- fix quota display on AIX; patch from Heinrich.Mislik@univie.ac.at (Heinrich Mislik)
(This used to be commit 760b63496c)
2004-03-16 19:06:03 +00:00
Gerald Carter
8ef645c8a9 BUG 1182: patch from john.klinger@lmco.com (John Klinger) to reanable the -n 'no cache' option for winbindd
(This used to be commit d1848988d9)
2004-03-16 18:54:09 +00:00
Alexander Bokovoy
e2fd98af57 Fix check_path_syntax() for multibyte encodings which have no '\' as second byte.
This is intermediate fix as discussed with Jeremy until we move check_path_syntax() to UCS2 internally where all
ambiguity is resolved. Please add other encodings into charcnv.c with such property.'
'
(This used to be commit 2c404f6ba9)
2004-03-16 17:18:57 +00:00
Gerald Carter
dbb38cc6b5 merging print change notify fix from HP appliance. Also might address some one the issues in BUG 1007
(This used to be commit 17ecea4152)
2004-03-16 17:06:11 +00:00
Gerald Carter
d24b8a2032 BUG 1165, 1126: Fix bug with secondary groups (security = ads) and winbind use default domain = yes
(This used to be commit f2eaa14b1e)
2004-03-16 16:41:54 +00:00
Jeremy Allison
96c5a010bb Avoid mb conversion overflow when sending an announcement.
Jeremy.
(This used to be commit 188e1daaff)
2004-03-16 00:10:30 +00:00
Jeremy Allison
ce0c99312c Use "unix netbios name" type unstring - 64 bytes long to manipulate netbios
names in nmbd. Allows conversion from dos codepage mb strings (ie. SJIS) to
expand to utf8 size on read.
Jeremy.
(This used to be commit 834d816caf)
2004-03-15 21:45:45 +00:00
Gerald Carter
96c66b7be7 removing extra comma in --with-fhs
(This used to be commit 12f3f0268c)
2004-03-15 16:20:03 +00:00
Gerald Carter
56f2e80d58 include swatdir in 'make showlayout'
(This used to be commit b1115c0fc5)
2004-03-15 16:14:04 +00:00
Gerald Carter
dbe9e8a4cb fix byte ordering problem when storing the updating pid for the lpq cache; was causing an abort in process_exists() on solaris
(This used to be commit 26681cd2a1)
2004-03-15 15:06:33 +00:00
Volker Lendecke
0f9186a1ac When trying to remove a user from a group, winbind should be informed
about the user and group...

Volker
(This used to be commit 9fa2c40452)
2004-03-14 07:15:39 +00:00
Tim Potter
5a521453ba Use possessive in message asking for user's password.
(This used to be commit cc9765ce97)
2004-03-14 03:47:03 +00:00
Jeremy Allison
a0034d3586 Ensure we don't truncate strcmps to nstring anymore...
Jeremy.
(This used to be commit d7cf64b1e4)
2004-03-13 02:47:21 +00:00
Jeremy Allison
6b9dbbcd24 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 b4ea493599)
2004-03-13 02:16:21 +00:00
Jeremy Allison
fd2d4f87d4 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 966e49a48c)
2004-03-13 00:28:53 +00:00
Herb Lewis
220d663b74 if we are truncating to the . we need to start at the beginning in case
there are multiple "."'s in the name.

This code is protected with an #ifdef TRUNCATE_NETBIOS_NAME and this
is #define'd to 1 directly above. Should we also get rid of the #ifdef?
(This used to be commit 0375dace24)
2004-03-12 21:35:15 +00:00
Jeremy Allison
95fee5e3bf Fix from Robert.Dahlem@gmx.net (Robert Dahlem) for bugid #1048
when mangled names are turned off.
Jeremy.
(This used to be commit 29909ce26a)
2004-03-12 20:24:05 +00:00
Alexander Bokovoy
6011a89e24 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 83dac6571f)
2004-03-12 14:37:37 +00:00
Alexander Bokovoy
82053806f5 Fix build after Jeremy -- yet another place where convert_string() wasn't updated
(This used to be commit 9acd46ab46)
2004-03-12 12:57:39 +00:00
Alexander Bokovoy
938cef91ff Fix string overflow due to wrong size calculation
(This used to be commit e1d0b8fc7b)
2004-03-12 11:21:50 +00:00
Jeremy Allison
03c0e32c28 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 2979c3e388)
2004-03-12 01:43:25 +00:00
Jeremy Allison
e3f5b54270 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 7b96765c23)
2004-03-11 22:48:24 +00:00
Jim McDonough
3d18997afd Get MungedDial actually working with full TS strings in it for pdb_ldap.
I know this isn't pretty, but neither was our assumption that all strings
from the directory fit inside a pstring.  There was no way this worked
before will all versions of usrmgr (for example, the only version of
mine that has the TS Confic button).
(This used to be commit d275c0e384)
2004-03-11 16:32:19 +00:00
Herb Lewis
a26e22edfb add missing #ifdef HAVE_BICONV stuff
(This used to be commit 9ea0560b0b)
2004-03-11 15:12:59 +00:00
Gerald Carter
929b0b72d5 BUG 1088: patch from SATOH Fumiyasu <fumiya@miraclinux.com> -- use strchr_m() for query_host (smbclient -L)
(This used to be commit bc6992c4bf)
2004-03-11 14:39:32 +00:00
Jeremy Allison
f2efeca274 Ensure we use check_path_syntax() to pull out DFS paths.
Jeremy
(This used to be commit 28f1e21c58)
2004-03-11 00:42:33 +00:00
Jeremy Allison
83560bfcfa 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 74722f2865)
2004-03-11 00:31:47 +00:00
Herb Lewis
2c2142d9d7 another typo
(This used to be commit e6c2d9a3f7)
2004-03-10 03:08:14 +00:00
Jeremy Allison
2867b9e2a0 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 e2709f99fc)
2004-03-10 02:38:39 +00:00
Jeremy Allison
ccf93c36d8 Formatting reformat before I start to change anything here.
Jeremy.
(This used to be commit 80fde09fc4)
2004-03-10 01:32:26 +00:00
Herb Lewis
3edf42f921 fix typo for tag in proto file
(This used to be commit 2367d988ae)
2004-03-10 00:53:36 +00:00
Jeremy Allison
46a718189c Fix dfs referrals - don't use check_path_syntax. Also use mb char calls in
dfs code.
Jeremy.
(This used to be commit 42175b4518)
2004-03-09 23:26:58 +00:00
Rafal Szczesniak
addfc95df2 Yet another '\n' termination of debug message.
rafal
(This used to be commit 3e57c2c685)
2004-03-09 21:47:49 +00:00
Rafal Szczesniak
1fabcf0a12 Fix to debug message lacking termination with '\n'.
rafal
(This used to be commit 2a7dd46943)
2004-03-09 18:58:19 +00:00
Gerald Carter
f089f978c2 fix build with gcc 2.96 and --with-developer
(This used to be commit 11fc4da07f)
2004-03-09 15:29:16 +00:00
Andrew Bartlett
32665c36c8 Given how core this code is, I figure it should have it's own testsuite.
Big thanks to tpot and mbp for showing how easy it can be to write a simple
unit test, and for providing the STF.

This also changes the strstr_m() code to use strstr_w() (avoiding
duplication) and fixes it so that it passes the STF.

(We now always restart before doing the unicode run, until sombody can
show me why the testsuite is wrong).

Andrew Bartlett
(This used to be commit a893a324f3)
2004-03-09 11:15:44 +00:00
Andrew Bartlett
151faf6935 JRA's recent strstr_m work really badly broke our string_sub code.
For example:

strstr_m("%v foo bar", "%v") would fail...

only strstr_m("foo %v", "%v") could work.

I wonder what else this broke...

Fix is to move to using strncmp() inside the strstr_m function.

Tested on ASCII only.

Andrew Bartlett
(This used to be commit 44d304f84c)
2004-03-09 09:56:33 +00:00
Jeremy Allison
c9b7cbbfa5 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 94a272b9a8)
2004-03-09 00:17:14 +00:00
Jeremy Allison
3f14e8eb9d 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 8702d00896)
2004-03-08 21:54:54 +00:00
Volker Lendecke
b3b93aaa3f 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 7ed61edbbe)
2004-03-07 08:22:06 +00:00
Volker Lendecke
6659353bd9 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 9fc0025d12)
2004-03-07 08:16:10 +00:00
Tim Potter
83d4d42462 Fix typo.
(This used to be commit e6e8b59f53)
2004-03-07 01:14:11 +00:00
Tim Potter
5e412188e9 Merge from HEAD.
(This used to be commit 89f3173f4f)
2004-03-07 00:50:37 +00:00
Tim Potter
bc8b6cd9eb Merge from HEAD.
(This used to be commit 1bba071126)
2004-03-07 00:09:36 +00:00
Jeremy Allison
48eb635f31 Several mb tidyups - getting ready to address the XXX_sub function.
Jeremy.
(This used to be commit 92c3ae3458)
2004-03-05 22:32:45 +00:00
Gerald Carter
474758956c BUG 488: fix the 'show client in col 1' button and corrctely enumerate active connections
(This used to be commit d77d38560d)
2004-03-05 18:37:01 +00:00
Gerald Carter
cb49c07c98 fix compiler warning
(This used to be commit df19b6066e)
2004-03-05 17:39:38 +00:00
Jelmer Vernooij
6643781811 Add -O (for writing downloaded files to standard out) based on patch by
Bas van Sisseren <bas@dnd.utwente.nl>
(This used to be commit cc164e5afb)
2004-03-05 17:17:31 +00:00
Jeremy Allison
893d5eba5d 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 6080186fc4)
2004-03-05 01:37:12 +00:00
Jeremy Allison
4020fadb1a 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 2a263873fd)
2004-03-04 18:55:37 +00:00
Gerald Carter
9b882ce3e5 BUG 1015: patch from jmcd to fix statfs redeclaration of statfs struct on ppc
(This used to be commit fafb243278)
2004-03-04 18:34:45 +00:00
Gerald Carter
7f6d708f86 BUG 1080: fix declaration of SMB_BIG_UINT
(This used to be commit 810bc1e2a0)
2004-03-04 18:17:01 +00:00
Volker Lendecke
51deca6bc9 There's a specific error message NT_STATUS_ALIAS_EXISTS.
(This used to be commit f0d99f318c)
2004-03-04 17:57:21 +00:00
Volker Lendecke
5dc2b72f9b Another typo, sorry for samba-cvs spam :-)
(This used to be commit 3e39d157cb)
2004-03-04 17:51:29 +00:00
Volker Lendecke
869561ad76 Fix typo.
Volker
(This used to be commit 8ba5bdc330)
2004-03-04 17:47:14 +00:00
Jim McDonough
7dc6dd5884 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 dc7dc51758)
2004-03-04 16:24:13 +00:00
Gerald Carter
e7efbb588a BUG 848: don't create winbind local users/groups that already exist in the tdb
(This used to be commit 89da3df07b)
2004-03-04 15:59:11 +00:00
Gerald Carter
43dd09f9da another fix for bug 761; don't default to bsd printing on linux
(This used to be commit d58139d64f)
2004-03-04 15:18:36 +00:00
Jeremy Allison
f0039da196 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 aad6eb2240)
2004-03-03 23:14:23 +00:00
Jeremy Allison
fba5a72249 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 c9f31fafed)
2004-03-03 20:55:59 +00:00
Jim McDonough
b737769a74 more usrmgr fixes: display lockout timers in minutes, not seconds, for samr 2e
(This used to be commit 832674c099)
2004-03-03 17:44:00 +00:00
Jim McDonough
8d12b8768a 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 fbf909926b)
2004-03-03 04:23:43 +00:00
Jim McDonough
78b8f3ca0c Merge fields_present function from HEAD. Now, a field will not be updated
on setuserinfo levels which include this field, unless the corresponding
bit (defined in passdb.h) is turned on.  Without this, newer versions
of usrmgr break us pretty bad.
(This used to be commit 840340bd96)
2004-03-02 21:02:09 +00:00
Gerald Carter
08d03a7039 BUG 1129: patch from shiro@miraclelinux.com (Shiro Yamada) to install image files for SWAT
(This used to be commit a01a7fdbd9)
2004-03-02 18:10:12 +00:00
Jeremy Allison
5f4b6ae77a Janitorial duty for tpot - --with-fhs fix.
Jeremy.
(This used to be commit 64eded518b)
2004-03-02 18:07:06 +00:00
Jim McDonough
db61673019 fix typo for callback bit
(This used to be commit 31a15164ff)
2004-03-02 18:04:16 +00:00
Gerald Carter
ef36785beb 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 14de9c0657)
2004-03-02 14:26:45 +00:00
Gerald Carter
62a7e258a3 BUG 761: read the config file before initialized default values for printing options
(This used to be commit d358f72974)
2004-03-02 04:09:39 +00:00
Gerald Carter
659d6a2b61 BUG 692: patch from SATOH Fumiyasu <fumiya@miraclelinux.com> to correct truncation of share names and workgroup names
(This used to be commit 822e31d841)
2004-03-01 17:40:40 +00:00
Gerald Carter
1fe6e29637 BUG 1147; bad pointer case in get_stored_queue_info() causing seg fault
(This used to be commit 91af1fb73a)
2004-03-01 17:03:05 +00:00
Volker Lendecke
c4877403a0 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 540f625036)
2004-02-29 16:34:33 +00:00
Volker Lendecke
efd357b732 Print an informative error message if trying to add/remove members from
something not a group.

Volker
(This used to be commit 73f26de5c0)
2004-02-29 12:47:45 +00:00
Volker Lendecke
a92de03d9e Add 'net rpc group [add|del]mem' for domain groups and aliases.
Volker
(This used to be commit e597420421)
2004-02-28 18:41:16 +00:00
Volker Lendecke
0e2de3d27e 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 e77fe4a77a)
2004-02-28 08:18:09 +00:00
Jeremy Allison
3fb52e5cc0 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 f4a7ea6dc2)
2004-02-28 01:53:30 +00:00
Jeremy Allison
3c1d00d12a More gentest fixes. Fix up regression in IS_NAME_VALID and renames.
Jeremy.
(This used to be commit 367f5c3bc2)
2004-02-28 00:56:42 +00:00
Rafal Szczesniak
c0b23c6c8c Added copyrights I forgot about looong ago...
rafal
(This used to be commit 33d1e2dd63)
2004-02-27 22:15:38 +00:00
Tim Potter
9d3529105e Fix for writable printerdata problem - bugzilla #1112.
(This used to be commit a05b9f0cc5)
2004-02-26 23:04:11 +00:00
Volker Lendecke
e1190848a1 That const was one too many
(This used to be commit 005d92d57e)
2004-02-26 14:34:44 +00:00
Volker Lendecke
d9819ec090 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. I'd like to have some feedback on the usability
of this.

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 eb4d4faff8)
2004-02-26 11:29:56 +00:00
Volker Lendecke
e692b991d1 And another little const
(This used to be commit f6bb3304fc)
2004-02-26 11:07:06 +00:00
Volker Lendecke
0689a2630d Apply some const
Volker
(This used to be commit 0b29d83d33)
2004-02-26 10:55:43 +00:00
Steve French
a3425dad72 Fixes to minor security bug pointed out by AB in the mount helper
(This used to be commit b83802c5a1)
2004-02-26 06:42:51 +00:00
Andrew Tridgell
79d5739893 fixed compilation with --enable-dmalloc
the macro redefinition of free() means we cannot have a structure
element called "free"
(This used to be commit d2d653a1a6)
2004-02-26 02:11:31 +00:00
Jeremy Allison
863c784ef4 Merging Richard's rename test.
Jeremy.
(This used to be commit 5646b6c989)
2004-02-26 01:33:35 +00:00
Jeremy Allison
fa81d1d7e7 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 3f35e3975f)
2004-02-26 01:31:10 +00:00
Andrew Bartlett
9e2a098a0a 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 191b43159e)
2004-02-25 23:12:29 +00:00
Andrew Bartlett
56bd63b1cd 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 86ad04d26d)
2004-02-25 22:01:02 +00:00
Jeremy Allison
fd6b9c02b9 Fixup strange rename error case (gentest).
Jeremy.
(This used to be commit d448fb801e)
2004-02-25 21:37:22 +00:00
Jim McDonough
af6f7254a9 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 98833a82fa)
2004-02-25 20:02:47 +00:00
Jim McDonough
8ccdcb3f1c reset time and duration are set in minutes, not seconds. Works from usrmgr.
(This used to be commit 700049d9ef)
2004-02-25 15:02:55 +00:00
Jeremy Allison
a45d29049b Figured out a new flags bit with gentest and ethereal....
Jeremy.
(This used to be commit b4b684f115)
2004-02-25 02:15:34 +00:00
Jeremy Allison
1d9f07735c 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 5107f6ee70)
2004-02-25 01:35:14 +00:00
Jeremy Allison
01cb68643c More gentest fixes.
Jeremy.
(This used to be commit d34785194c)
2004-02-25 00:48:35 +00:00
Volker Lendecke
f934f5d7df 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 76c75bb8a7)
2004-02-24 18:00:41 +00:00
Volker Lendecke
6d3e45579e Remove unused variable.
Volker
(This used to be commit eece7ff000)
2004-02-24 17:28:17 +00:00
Volker Lendecke
2afb1b60d7 'net idmap restore' is too useful to be left broken :-)
Set the HWM values correctly after having manipulated the tdb.

Volker
(This used to be commit b1eba2188b)
2004-02-24 15:45:10 +00:00
Jeremy Allison
f96e84c682 Ensure '.' and '..' don't match in delete requests.
Jeremy.
(This used to be commit 1b0d54170a)
2004-02-24 01:46:24 +00:00
Jeremy Allison
5447f1f467 More gentest error fixups.
Jeremy.
(This used to be commit 00f71fc836)
2004-02-24 00:55:05 +00:00
Jeremy Allison
69058407ef Fixup bad-path error found by gentest.
Jeremy.
(This used to be commit 63d47f3364)
2004-02-24 00:38:39 +00:00
Jeremy Allison
b88f446352 Added NTrename SMB (0xA5) - how did we miss this.... ?
Jeremy.
(This used to be commit dfd7d1c2b7)
2004-02-24 00:06:08 +00:00
Jeremy Allison
13dd3e60bd Fixup correct timeout values for blocking lock timeouts (tested at connectathon
by Herb).
Jeremy.
(This used to be commit b38b3a5542)
2004-02-24 00:03:18 +00:00
Andrew Bartlett
06549b8886 Found by Fabien Chevalier <fabien.chevalier@supelec.fr> and
JustFillBug <mozbugbox@yahoo.com.au> 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 9ffc490fce)
2004-02-23 21:09:09 +00:00
Jeremy Allison
aa4abfb3b5 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.
Jeremy.
(This used to be commit f9c7a42e89)
2004-02-23 20:12:31 +00:00
Jim McDonough
24df38dbc6 Janitor for tpot...bugzilla #1098, msleep already exists on aix
(This used to be commit 4319df7fdc)
2004-02-23 02:54:03 +00:00
Jim McDonough
401959b7d7 Add bad password count/time attributes
(This used to be commit 003318939f)
2004-02-23 02:47:33 +00:00
Jim McDonough
ee5dd175e5 Add calls to password lockout functions. Should now work against tdbsam only.
(This used to be commit 3e8a9c3584)
2004-02-21 17:41:28 +00:00
Tim Potter
37d0cb0b70 printf -> d_printf
Bugzilla #1066.
(This used to be commit 2285ec9737)
2004-02-21 00:28:48 +00:00
Jeremy Allison
ef8f827449 Make SMB_FILE_ACCESS_INFORMATION call work correctly.
Jeremy.
(This used to be commit 0ea0ada6c6)
2004-02-20 23:19:39 +00:00
Jeremy Allison
7d7849b18a 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.
Jeremy.
(This used to be commit 5c6f8b1053)
2004-02-20 22:45:53 +00:00
Jim McDonough
9264194340 handle both 0 and -1 as disabling reset count and lockout duration
(This used to be commit 84fe24e64e)
2004-02-20 16:00:25 +00:00
Jim McDonough
4a7d90424f 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 7ff42fffb2)
2004-02-20 15:59:05 +00:00
Gerald Carter
8adb394ee6 just say no to crack
(This used to be commit 66be4492aa)
2004-02-20 15:52:14 +00:00
Gerald Carter
11bf157469 <attr/xattr.h> & <sys/xattr.h> are mutually exclusive it seems; fix build on SuSE 8.2
(This used to be commit 34e6c5f8f3)
2004-02-20 15:50:18 +00:00
Jeremy Allison
1bfc09c51c Fixup correct (as per W2K3) returns for lookupsids as well as lookupnames.
Inspired by Volkers patch.
Jeremy.
(This used to be commit a47127e90e)
2004-02-19 23:00:01 +00:00
Gerald Carter
95bc32e93c sys/xattr.h merge from HEAD
(This used to be commit 798dd7299e)
2004-02-19 22:17:54 +00:00
Jim McDonough
5fc9dd0be6 Enable checking/resetting of account lockout and bad password based on policy
(This used to be commit bd2e55399c)
2004-02-19 21:40:22 +00:00
Jim McDonough
222d9a3ce2 Clean up bad pw count and autolock flag update fn()s
(This used to be commit 9a79f9fbcb)
2004-02-19 21:37:24 +00:00
Jim McDonough
e507a83617 Add bad pw count and autolock flag update fn()s
(This used to be commit 600fcd534b)
2004-02-19 18:35:43 +00:00
Jim McDonough
f56317baef Add bad password reset and display of bad password count/time
(This used to be commit 34fe16e445)
2004-02-19 16:00:29 +00:00
Jim McDonough
39a154ae92 Add functions to get/set bad password time
(This used to be commit 557f598c63)
2004-02-19 15:59:35 +00:00
Jim McDonough
955ec7c6e2 Add bad password time fields
(This used to be commit 59e7c3abab)
2004-02-19 15:57:53 +00:00
Jeremy Allison
8eec62ebfb Fix the "too many fcntl locks" scalability problem raised by tridge.
I've now tested this in daemon mode and also on xinetd and I'm pretty
sure it's working.
Jeremy.
(This used to be commit 14dee03801)
2004-02-19 01:55:24 +00:00
Steve French
5e39e9f313 Fix incorrect strnicmp len
(This used to be commit ad1ebb5000)
2004-02-17 22:51:42 +00:00
Jeremy Allison
8801465d30 Fix based on Volker's code to correctly return code from lsa_lookup_sids
on unmapped sids.
Jeremy.
(This used to be commit 37a52c3168)
2004-02-17 22:46:25 +00:00
Steve French
d5ad8c5099 Disable dev (MS_NODEV) on user mounts from cifs vfs
(This used to be commit 9b0d1072bc)
2004-02-17 21:31:25 +00:00
Volker Lendecke
8f3507338e When creating a group via a script, don't let winbind do it as well.
Volker
(This used to be commit 6a229f1488)
2004-02-17 21:25:42 +00:00
Volker Lendecke
34a9928ee1 Be able to set alias info for builtin as well.
Volker
(This used to be commit 7a947ecdf5)
2004-02-17 15:54:57 +00:00
Volker Lendecke
96a5c5e38c Don't try to show groups that could not be listed.
Volker
(This used to be commit d713e76a24)
2004-02-17 15:24:28 +00:00
Volker Lendecke
07892673ff In samr_lookup_names Windows does not return WKN_GRP(5) but ALIAS(4) when
you search in BUILTIN. Match that.

Volker
(This used to be commit 2863b21d8a)
2004-02-17 10:11:53 +00:00
Volker Lendecke
6b7e509004 If there are no alias members, don't ask for their sids :-)
Volker
(This used to be commit 99f03a641e)
2004-02-17 10:08:18 +00:00