1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-05 09:18:06 +03:00
Commit Graph

2353 Commits

Author SHA1 Message Date
Jeremy Allison
442b9f3e87 r5933: We were handling setting of EA's incorrectly - we should be able to set
a list. Also not converting names from DOS CP to UNIX CP correctly. This
code doesn't quite work yet but it's a work in progress to be fixed
tomorrow (don't want to lose it).
Jeremy.
(This used to be commit 22fca74657)
2007-10-10 10:56:09 -05:00
Jeremy Allison
0fcb427f78 r5907: Fix compile warning noticed by Jason Mader <jason@ncac.gwu.edu>.
Bug #2483.
Jeremy.
(This used to be commit f6db0f5e8a)
2007-10-10 10:56:08 -05:00
Jeremy Allison
f4c9a4bc44 r5789: Patch from William Jojo <jojowil@hvcc.edu> - AIX has no default ACLs.
Bug #2445.
Jeremy.
(This used to be commit c9b5e32650)
2007-10-10 10:56:00 -05:00
Gerald Carter
66df8431ec r5726: merge LsaLookupPrivValue() code from trunk
(This used to be commit 277203b535)
2007-10-10 10:55:57 -05:00
Volker Lendecke
140752fd35 r5647: Caches are good for performance, but you get a consistency problem.
Fix bug # 2401.

Volker
(This used to be commit eb4ef94f24)
2007-10-10 10:55:53 -05:00
Gerald Carter
b03c74446a r5565: fix breakage on gcc 2.96
(This used to be commit 67f8a1e3bc)
2007-10-10 10:55:47 -05:00
Günther Deschner
f823e8c411 r5556: Fix the build on AIX.
use AF_UNIX instead of AF_LOCAL (thanks to Doug VanLeuven
<roamdad-at-sonic.net>) and make smbldap_open() a bit more readable.

Guenther
(This used to be commit 526d6a9493)
2007-10-10 10:55:47 -05:00
Günther Deschner
0a063991a7 r5522: Better handling of LDAP over IPC connections that have expired on the
LDAP-Server.

Guenther
(This used to be commit 8017a7a150)
2007-10-10 10:55:44 -05:00
Gerald Carter
96a3fede40 r5517: code cleanup; rename the sorted_tree to pathtree (used by registry code)
I was going to use this for tracking dfs mounts in smbclient
but found another way.  Still the cleanup is valid so commiting it.
should be minimally disruptive since it is not widely used.
(This used to be commit 00738dca3b)
2007-10-10 10:55:43 -05:00
Volker Lendecke
0b451e5cab r5484: Fix a memleak
(This used to be commit 7b9cb0601c)
2007-10-10 10:55:42 -05:00
Gerald Carter
bfc76114f6 r5436: small merges from trunk
(This used to be commit f17ffdf805)
2007-10-10 10:55:40 -05:00
Gerald Carter
732f09990f r5431: couple of cimpile fixes from Jason Mader <jason@ncac.gwu.edu> -- BUGS 2341 & 2342
(This used to be commit 0edcfc7fa2)
2007-10-10 10:55:40 -05:00
Volker Lendecke
f51677051c r5428: Apply some const. LDAP attribs should now be declared const char *attr[]. This
gives some new warnings in smbldap.c, but a the callers are cleaned up.

Volker
(This used to be commit 543799fc0d)
2007-10-10 10:55:40 -05:00
Günther Deschner
6c84ecb556 r5349: After talking with Jerry, reverted the addition of account policies to
passdb in 3_0 (they are still in trunk).

Guenther
(This used to be commit fdf9bdbbac)
2007-10-10 10:55:38 -05:00
Jeremy Allison
0f87a9ada3 r5343: Fix for bug#1525. Timestamps interpreted incorrectly on 64-bit time_t values.
Jeremy.
(This used to be commit 00f8ac509a)
2007-10-10 10:55:38 -05:00
Jeremy Allison
daa2d8bd1f r5342: Reformat some very old code.
Jeremy.
(This used to be commit 08553faeeb)
2007-10-10 10:55:38 -05:00
Volker Lendecke
aa9132cc55 r5331: Support SIDs as %s replacements in the afs username map parameter.
Add 'log nt token command' parameter. If set, %s is replaced with the user
sid, and %t takes all the group sids.

Volker
(This used to be commit e7dc9fde45)
2007-10-10 10:55:37 -05:00
Günther Deschner
2c5e65dd5f r5235: Fix compile warning.
(This used to be commit 00b5990617)
2007-10-10 10:55:34 -05:00
Gerald Carter
a84bb6d1ec r5203: additional changes for BUG 2291 to restrict who can join a BDC and add domain trusts
(This used to be commit 5ec1faa2ad)
2007-10-10 10:55:32 -05:00
Gerald Carter
9dbb5769fe r5174: ensure that we consistently use the current_user_info.smb_name vs. smb_name when parsing smb.conf and reloading config files
(This used to be commit be537eaebe)
2007-10-10 10:55:31 -05:00
Jim McDonough
92bbd3151d r5163: Fix bugzilla 2062:
turn off broadcast for all 390 NICs.
(This used to be commit d159a5013e)
2007-10-10 10:55:31 -05:00
Gerald Carter
6fd5918b06 r5158: BUG 2263: patch from Timur Bakeyev <timur@com.bat.ru> to guard base64_encode_data_blob() against empty blobs
(This used to be commit 17239d609f)
2007-10-10 10:55:30 -05:00
Gerald Carter
f35a9c5af6 r5150: consolidate the samr_make.*obj_sd() functions to share code
(This used to be commit 5bd03d5926)
2007-10-10 10:55:29 -05:00
Volker Lendecke
3924332071 r5127: Fix Bug 2289 -- thanks to jason@ncac.gwu.edu
(This used to be commit 8c35c3bf2e)
2007-10-10 10:55:28 -05:00
Jeremy Allison
91bf6cb6bf r5100: We should only care about case-sensitivity when *reading* an incoming
filename, not returning one. Makes us pass one more Samba4 RAW-SEARCH test.
Jeremy.
(This used to be commit 228d1e1649)
2007-10-10 10:55:15 -05:00
Jeremy Allison
8ac31b5034 r5066: A couple of small fixes from James Peach @ SGI.
Jeremy.
(This used to be commit 9d131e9419)
2007-10-10 10:55:13 -05:00
Gerald Carter
46d8ff2320 r5015: (based on abartlet's original patch to restrict password changes)
* added SE_PRIV checks to access_check_samr_object() in order
  to deal with the run-time security descriptor and their
  interaction with user rights

* Reordered original patch in _samr_set_userinfo[2] to still
  allow root/administrative password changes for users and machines.
(This used to be commit f9f9e6039b)
2007-10-10 10:55:12 -05:00
Gerald Carter
33b789f321 r4995: fail set_privileges() if 'enable privileges = no' to prevent confused admins who never read what I write :-)
(This used to be commit 1d7a636e0e)
2007-10-10 10:55:11 -05:00
Günther Deschner
23f558535e r4989: Display failed LDAP-server-uri.
Guenther
(This used to be commit d433c7b476)
2007-10-10 10:55:10 -05:00
Günther Deschner
b4afdc08d5 r4925: Migrate Account Policies to passdb (esp. replicating ldapsam).
Does automated migration from account_policy.tdb v1 and v2 and offers a
pdbedit-Migration interface. Jerry, please feel free to revert that if
you have other plans.

Guenther
(This used to be commit 75af83dfcd)
2007-10-10 10:55:08 -05:00
Jeremy Allison
6f56a5be2e r4917: Merge some of Derrell.Lipman@UnwiredUniverse.com obvious fixes.
Added text explaining units in pdbedit time fields.
Jeremy.
(This used to be commit 3d09c15d8f)
2007-10-10 10:55:07 -05:00
Gerald Carter
b3757eadf0 r4849: * finish SeAddUsers support in srv_samr_nt.c
* define some const SE_PRIV structure for use when
  you need a SE_PRIV* to a privilege
* fix an annoying compiler warngin in smbfilter.c
* translate SIDs to names in 'net rpc rights list accounts'
* fix a seg fault in cli_lsa_enum_account_rights caused by
  me forgetting the precedence of * vs. []
(This used to be commit d25fc84bc2)
2007-10-10 10:53:59 -05:00
Günther Deschner
0c6010238d r4840: * Add more generic root-dse inspection function to check for given
controls or extensions.
* Check and remember if ldapsam's LDAP Server support paged results
(in preparation of adding async paged-results to set|get|end-sampwent in
ldapsam).

Guenther
(This used to be commit ced58bd884)
2007-10-10 10:53:57 -05:00
Gerald Carter
b4aaa2ae25 r4822: fix return code when you ask for a non-privileged SID via one of the privileges RPC calls
(This used to be commit 3f4f2c80fd)
2007-10-10 10:53:56 -05:00
Gerald Carter
ade3ef6f04 r4809: * include SeDiskOperatorPrivilege and SeRemoteShutdownPrivilege
(noty enfornced yet though)
* add 'enable privileges (off by default) to control whether or
  not any privuleges can be assigned to SIDs
(This used to be commit cf63519169)
2007-10-10 10:53:55 -05:00
Gerald Carter
46e5effea9 r4805: Last planned change to the privileges infrastructure:
* rewrote the tdb layout of privilege records in account_pol.tdb
  (allow for 128 bits instead of 32 bit flags)
* migrated to using SE_PRIV structure instead of the PRIVILEGE_SET
  structure.  The latter is now used for parsing routines mainly.

Still need to incorporate some client support into 'net' so
for setting privileges.  And make use of the SeAddUserPrivilege
right.
(This used to be commit 41dc7f7573)
2007-10-10 10:53:55 -05:00
Gerald Carter
ff90927478 r4746: add server support for lsa_enum_acct_rights(); last checkin for the night
(This used to be commit ccdff4a998)
2007-10-10 10:53:54 -05:00
Gerald Carter
c727866172 r4742: add server support for lsa_add/remove_account_rights() and fix some parsing bugs related to that code
(This used to be commit 7bf1312287)
2007-10-10 10:53:53 -05:00
Gerald Carter
c3ba8b9a53 r4736: small set of merges from rtunk to minimize the diffs
(This used to be commit 4b351f2fcc)
2007-10-10 10:53:52 -05:00
Volker Lendecke
8a24c39d76 r4731: Fix the build
(This used to be commit 340d7f3173)
2007-10-10 10:53:51 -05:00
Gerald Carter
d94d87472c r4724: Add support for Windows privileges in Samba 3.0
(based on Simo's code in trunk).  Rewritten with the
following changes:

* privilege set is based on a 32-bit mask instead of strings
  (plans are to extend this to a 64 or 128-bit mask before
   the next 3.0.11preX release).
* Remove the privilege code from the passdb API
  (replication to come later)
* Only support the minimum amount of privileges that make
  sense.
* Rewrite the domain join checks to use the SeMachineAccountPrivilege
  instead of the 'is a member of "Domain Admins"?' check that started
  all this.

Still todo:

* Utilize the SePrintOperatorPrivilege in addition to the 'printer admin'
  parameter
* Utilize the SeAddUserPrivilege for adding users and groups
* Fix some of the hard coded _lsa_*() calls
* Start work on enough of SAM replication to get privileges from one
  Samba DC to another.
* Come up with some management tool for manipultaing privileges
  instead of user manager since it is buggy when run on a 2k client
  (haven't tried xp).  Works ok on NT4.
(This used to be commit 77c10ff9aa)
2007-10-10 10:53:51 -05:00
Jim McDonough
deaaa6ee9e r4651: Add "refuse machine password change" policy field. This update will just
return the appropriate reg value.  Enforcement to be added soon.

Also, fix account policy tdb upgrade so it doesn't just wipe out everything
that was in there from a a previous version.
(This used to be commit ccae934cf9)
2007-10-10 10:53:50 -05:00
Jeremy Allison
c057e4591b r4581: From Derrell.Lipman@UnwiredUniverse.com. Use nanosleep instead of select
when we have it in smb_msleep.
Jeremy.
(This used to be commit 465c207ffb)
2007-10-10 10:53:48 -05:00
Jeremy Allison
1afc2e01ce r4545: Fix based on work by Derrell.Lipman@UnwiredUniverse.com :
* In an application with signals, it was possible for functions to block
    indefinitely while awaiting timeouts.  This patch ensures that if a system
    call with a timeout is aborted and needs to be restarted, it is restarted
    with a timeout which is adjusted for the amount of time already waited.

Jeremy.
(This used to be commit 3a0d426764)
2007-10-10 10:53:47 -05:00
Jeremy Allison
44bac2bf7b r4334: Fix for bugid #2186 - from Buck Huppmann <buckh@pobox.com>
to prevent uninitialized creds being freed.
Jeremy.
(This used to be commit c3f9c81a8f)
2007-10-10 10:53:44 -05:00
Jeremy Allison
ebeddee6a1 r4306: Couple more MALLOC fixes from albert chin (china@thewrittenword.com).
Jeremy.
(This used to be commit c5a8bf3335)
2007-10-10 10:53:43 -05:00
Jeremy Allison
99f0355eb5 r4305: Fix from Albert Chin (china@thewrittenword.com) to fix the
earlier malloc changes.
Jeremy.
(This used to be commit da7ef25171)
2007-10-10 10:53:43 -05:00
Jeremy Allison
be60bf6447 r4296: Patch from William Jojo <jojowil@hvcc.edu> to fix HPUX sendfile and add
configure.in tests and code for sendfile on AIX.
Jeremy.
(This used to be commit f08aceb988)
2007-10-10 10:53:42 -05:00
Jeremy Allison
b46913fb95 r4291: More *alloc fixes inspired by Albert Chin (china@thewrittenword.com).
Jeremy
(This used to be commit efc1b688cf)
2007-10-10 10:53:42 -05:00
Günther Deschner
84e0aafc78 r4289: Close LDAP-Connection before retrying to open a new connection in the
retry-loop.

This fixes a deadlock-situation when ldapsam is used with the ldapi
interface: getpeername won't fail while trying to detect dead
connections on unix domain sockets. When the ldapi-connection was closed
server-side (due to OpenLDAP's idletimeout) we *never* got a new LDAP
connection.

Guenther
(This used to be commit ac8032bacf)
2007-10-10 10:53:42 -05:00
Tim Potter
1cf3798138 r4270: Add some const as a fix for bugzilla #2135.
(This used to be commit ad8fdcc6fd)
2007-10-10 10:53:41 -05:00
Volker Lendecke
c96872d3ab r4256: Add a patch from kllin@it.su.se: New Parameter 'afs token lifetime' tells the
AFS client when to throw away a token.

Thanks,

Volker
(This used to be commit 836a8277b2)
2007-10-10 10:53:40 -05:00
Volker Lendecke
efe5a8eb0b r4252: Comment clarification from Love Hörnquist Åstrand <lha@stacken.kth.se>.
Thanks,

Volker
(This used to be commit 207625c7ab)
2007-10-10 10:53:40 -05:00
Jeremy Allison
59f2d8590d r4241: More *alloc fixes.
Jeremy.
(This used to be commit ec9606f00b)
2007-10-10 10:53:39 -05:00
Jeremy Allison
54fdd5c7dc r4236: More *alloc fixes.
Jeremy.
(This used to be commit 6b25a6e088)
2007-10-10 10:53:39 -05:00
Volker Lendecke
786b6c5e28 r4217: Fix open_any_socket_out.
This was a missing merge from HEAD or rather a commit to 3_0 from the wrong
source. Fixed slightly over HEAD, HEAD merge will follow.

Deal with connection refused according to the specs.

Volker
(This used to be commit 7230cb87eb)
2007-10-10 10:53:38 -05:00
Jeremy Allison
92a7eb69d3 r4126: Fix from Björn Jacke <bjoern@j3e.de> for bugid #2040 - ensure the locale
is reset to C to get ASCII-compatible toupper/lower functions.
Jeremy.
(This used to be commit 8e1b1693ab)
2007-10-10 10:53:35 -05:00
Jeremy Allison
e53d780628 r4120: Never, ever, doubt valgrind :-). Fix order of evaluation bug that's been in the
bitmap code for ever. Remove silly extra space in paranoid malloc.
Jeremy.
(This used to be commit 0a7d17bc9b)
2007-10-10 10:53:34 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Jeremy Allison
d7a1c4f79c r4032: Fix bug #2110 - ensure we convert to ucs2 correctly.
Jeremy.
(This used to be commit a1e5a2a6ab)
2007-10-10 10:53:30 -05:00
Jeremy Allison
93435b5096 r4009: Fix from Timur Bakeyev <timur@com.bat.ru> for bugid #2100,
change the way we check for errors after a dlopen (which
may set internal warnings which get picked up by mistake
in dlsym).
Jeremy
(This used to be commit 6711cb8b02)
2007-10-10 10:53:27 -05:00
Jeremy Allison
482f14871d r3946: Fix for bugid #2085 reported by Jason Mader <jason@ncac.gwu.edu>. Use consistent
enum type for Protocol extern.
Jeremy.
(This used to be commit 65dfae7ea4)
2007-10-10 10:53:26 -05:00
Jeremy Allison
314ec086f3 r3944: Fix the problem we get on Linux where sendfile fails, but we've already sent the
header using send(). As our implementation of sendfile can't return EINTR (it
restarts in that case) use an errno of EINTR to signal the linux sendfile fail
after header case. When that happens send the rest of the data and then turn
off sendfile. Sendfile should be safe to enable on all systems now (even though
it may not help in all performance cases).
Jeremy.
(This used to be commit 78236382f7)
2007-10-10 10:53:26 -05:00
Günther Deschner
3bd5c9a838 r3940: typo.
Guenther
(This used to be commit 412ff4a129)
2007-10-10 10:53:25 -05:00
Jeremy Allison
b74b9c5037 r3857: Shut up gcc about erroneous "used uninitialised" warning.
Jeremy.
(This used to be commit ac9b91d805)
2007-10-10 10:53:21 -05:00
Volker Lendecke
24d3605d99 r3843: If a connection to a DC is requested, open connections simultaeneously to all
DCs found. The first one to reply wins.

Volker
(This used to be commit 84ac54aef2)
2007-10-10 10:53:20 -05:00
Volker Lendecke
f9e87b9ba6 r3705: Nobody has commented, so I'll take this as an ack...
abartlet, I'd like to ask you to take a severe look at this!

We have solved the problem to find the global groups a user is in twice: Once
in auth_util.c and another time for the corresponding samr call. The attached
patch unifies these and sends them through the passdb backend (new function
pdb_enum_group_memberships). Thus it gives pdb_ldap.c the chance to further
optimize the corresponding call if the samba and posix accounts are unified by
issuing a specialized ldap query.

The parameter to activate this ldapsam behaviour is

ldapsam:trusted = yes

Volker
(This used to be commit b94838aff1)
2007-10-10 10:53:15 -05:00
Volker Lendecke
c34ec6180a r3702: This is a getpwnam-cache. It is mainly to speed up Samba with slow nss
backends such as nss_ldap.

Volker
(This used to be commit a8bd0b7504)
2007-10-10 10:53:14 -05:00
Jeremy Allison
ecd1b0fffd r3693: Correctly detect errno for no acl/ea support.
Jeremy
(This used to be commit 089a76f611)
2007-10-10 10:53:14 -05:00
Günther Deschner
92e05b34ae r3650: Allow to call spoolss-server as "localhost".
Guenther
(This used to be commit 14a0292250)
2007-10-10 10:53:11 -05:00
Jeremy Allison
c0406ae1b0 r3642: Extend vfs to add seekdir/telldir/rewinddir. Yes I know I have to
fix the modules too... First step in fixing out large directories
problem.
Jeremy.
(This used to be commit 344e9dd33a)
2007-10-10 10:53:11 -05:00
Volker Lendecke
55fe875a44 r3563: During a typical logon a modern workstation makes a lot of anonymous session
setups on its way to open a pipe. This gets rid of many round-trips to the
LDAP server during logon by setting up the server_info_guest once and not
asking the LDAP server and nss every time. Make sure that the ldap connection
is reopened in the child. (I did not look at the sql backends.)

Volker
(This used to be commit 3298f6105e)
2007-10-10 10:53:09 -05:00
Volker Lendecke
9c61daf667 r3561: Since we have tdb_reopen_all() after all forks, the local_pid logic is not
correct anymore. If we actually open the tdb before the fork, we end up
opening the tdb twice. Jerry, jra, this also happens in the locking and
printing subsystems. You might want to check it there (not that it actually
happens right now, but this gave me some confusion lately...).

Volker
(This used to be commit 40cad9dcc1)
2007-10-10 10:53:09 -05:00
Gerald Carter
c53e6401eb r3049: fixing some calls in the printing code to stanard_sub_basic(); fix standard_sub_snum() to use the current user's gid; add some (snum == -1) checks to standard_sub_advanced()
(This used to be commit 8c3fd1908d)
2007-10-10 10:52:59 -05:00
Jeremy Allison
6ae9b63f01 r2978: Fix #1926 typo in debug. Found by Bill McGonigle <bill+samba@bfccomputing.com>.
Jeremy.
(This used to be commit 4fd314243e)
2007-10-10 10:52:58 -05:00
Andrew Bartlett
4792a8de30 r2868: Well, I'm not quite sure what I'm doing back in Samba 3.0, but anyway...
I've been grumbling about under-efficient calls in SAMR, and finally
got around to fixing some of them.

We now call sys_getgroups() (which in turn calls initgroups(), until
glibc 3.4 is released) to figure out a user's group membership.  This
is far, far more efficient than scanning all the groups looking for a
match, and is still the 'posix way', just using an effiecient call.

The seperate issue of 'who is in this group' remains, but this one has
been biting some people.

I need to talk to VL about how best to exersise nasty corner cases,
but my initial tests hold strong.  (The code is also much simpiler
than before, which has to count for something :-)

Andrew Bartlett
(This used to be commit dc19f16169)
2007-10-10 10:52:55 -05:00
Andrew Tridgell
d9b8eaabc5 r2824: restored the is_case_sensitive option to ms_fnmatch() in Samba3. It is
very rarely used, but we sohuldn't be removing a feature in a minor
release of this kind.
(This used to be commit 4ce0505bc3)
2007-10-10 10:52:54 -05:00
Rafal Szczesniak
8199abf7d8 r2813: Fix the build.
At least temporarily, since I've got the impression that _real_ fix
is more complex...

rafal
(This used to be commit 982912f0c8)
2007-10-10 10:52:53 -05:00
Andrew Tridgell
640f124ca2 r2778: merged the new samba4 ms_fnmatch code to Samba3. Thanks to Rusty
Russel for some help in designing the new algorithm.
(This used to be commit 38144f8d2c)
2007-10-10 10:52:52 -05:00
Gerald Carter
31441aaa13 r2768: BUG 1519: save the hostname used in the open_printer_ex() for later reuse when filling in the spolss replies (also gets rid of get_called_name()
(This used to be commit 57db8ca91f)
2007-10-10 10:52:52 -05:00
Volker Lendecke
61918e78b7 r2729: Fix ldapsam_compat homeDrive. Thanks to jason@env.leeds.ac.uk
Volker
(This used to be commit ef057e9534)
2007-10-10 10:52:50 -05:00
Jeremy Allison
eb9a09954b r2651: Added 'stat' command to smbclient to exercise the UNIX_FILE_BASIC
info level. Outputs data on the file in the same format the the
stat command in Linux. Should be useful to people wanting to learn
how to parse the UNIX extension output.
Yes I will add the docs later :-).
Jeremy.
(This used to be commit b25cc59641)
2007-10-10 10:52:48 -05:00
Jeremy Allison
17ab9e8db1 r2610: Even if we only use the fast-path (ascii only) then
we still need to set errno = E2BIG when we overflow.
Jeremy.
(This used to be commit 7b0560dccc)
2007-10-10 10:52:48 -05:00
Jeremy Allison
bd5a0ed2f6 r2605: Fix stupid typo in back-port of Samba4 fix.
Jeremy.
(This used to be commit ca9516520f)
2007-10-10 10:52:47 -05:00
Simo Sorce
70ac6b6b55 r2599: avoid free()ing our static unalloceted memory that ends up in memory corruption.
(This used to be commit 557e12d1b5)
2007-10-10 10:52:47 -05:00
Jeremy Allison
b2cd6300d7 r2578: Pick up optimisation from Samba4 - thanks tridge !
- I recently found out that charaters below 0x3F are guaranteed not to
  occur as secondary bytes in any multi-byte character set. This
  allows for a very simple optimisation in strchr_m() and
  strrchr_m(). It might be a good idea to pick this up for Samba3.
Jeremy.
(This used to be commit 0465e2d23d)
2007-10-10 10:52:47 -05:00
Volker Lendecke
ec62d5a968 r2444: Based on jmcd's patch, implement special lists for the ldap user attributes to
delete.

Richard, IMHO this is the better solution to the problem you currently
have. Please review.

Thanks,

Volker
(This used to be commit 6957d6a892)
2007-10-10 10:52:43 -05:00
Jeremy Allison
fb4c421f1b r2392: Steal the nicer error message from Samba4 :-).
Jeremy.
(This used to be commit afa88868b7)
2007-10-10 10:52:42 -05:00
Jeremy Allison
3ef0710fa4 r2361: Fix the appalling toktocliplist() fn. Bug found by Luis Benvenutto.
Jeremy.
(This used to be commit d434d8e2b4)
2007-10-10 10:52:40 -05:00
Simo Sorce
410a6c72ea r2331: check password script code and example from trunk
(This used to be commit f836be323a)
2007-10-10 10:52:39 -05:00
Volker Lendecke
debfeb8878 r2258: Attempt to fix Bug 1715. Not sure if all of ldapsam_compat works now, but this
definitely fixes two segfaults.

Volker
(This used to be commit 2707401899)
2007-10-10 10:52:37 -05:00
Paul Green
b887c41253 r2231: Fix iconv.c to use the Samba-supplied uint8 type not the uint8_t type, which does not exist on all platforms.
(This used to be commit acc793ead7)
2007-10-10 10:52:36 -05:00
Jeremy Allison
5480cfc26b r2213: Optimisation. Passes masktest against W2K3.
Jeremy.
(This used to be commit 5dc3324c4f)
2007-10-10 10:52:36 -05:00
Jeremy Allison
c5b11b56aa r2175: Fix for #1546 from fumiya@samba.gr.jp. Preserve errno in MB strupper_m/strlower_m.
Jeremy.
(This used to be commit 615aa6e914)
2007-10-10 10:52:34 -05:00
Andrew Tridgell
d9a1327474 r2163: converted samba3 to use the new utf-16 aware iconv code. Also changed
iconv to recognise UCS-2LE and UTF-16LE as synonyms, which means this
change should be more robust when applied in trees that treat UCS-2LE
or UTF-16LE as correct.
(This used to be commit 92c9fcaec4)
2007-10-10 10:52:34 -05:00
Andrew Tridgell
018de0186b r2160: fixed the uuid pack/unpack routines (they could go past the end of the UUID structure)
(This used to be commit 43cf57e86b)
2007-10-10 10:52:34 -05:00
Jeremy Allison
b0b317edbf r2155: Reformat, plus steal from Samba4 :-).
tridge:
the lp_use_mmap() in map_file() is inappropriate for 2 reasons, so I have removed it.

 - lp_use_mmap() is really meant to cope with systems that have broken
   mmap coherence, but map_file() doesn't need coherence, as its maps
   read only

 - map_file() is used to map the charset files before loadparm has
   loaded, so lp_use_mmap() is always returning false for the major
   use of map_file()

Jeremy.
(This used to be commit 3716dbc0cb)
2007-10-10 10:52:33 -05:00
Gerald Carter
278f9467f2 r2133: Several fixes:
* BUG 1627: fix for NIS compiles on HPUX 11.00, AIX 4.3 and 5.1
  patch from Olaf Flebbe <o.flebbe@science-computing.de>.
  Will need to watch this one in the build farm.

* Fix bug found by rwf@loonybin.net where the PRINT_ATTRIBUTE_PUBLISHED
  was getting reset by attempts to sanitize the defined attributes
  (PRINTER_ATTRIBUTE_SAMBA)

* Resolve name conflict on DEC OSF-5.1 (inspired by patch from
  Adharsh Praveen <rprav@india.hp.com>)

* Work around parsing error in the print change notify code
  (not that the alignment bug is still there but reording the
   entries in the array works around it).

* remove duplicate declaration of getprintprocdir from rpcclient.
(This used to be commit 7474c6a446)
2007-10-10 10:52:32 -05:00
Jeremy Allison
651daa4b42 r2114: Shameless theft of iconv commit from Samba4 to keep the two libs more in sync :-).
try to cope with a wider range of UTF-16 characters when we are using
an external libiconv library.
Jeremy.
(This used to be commit 5d04cd6804)
2007-10-10 10:52:32 -05:00
Jeremy Allison
58a1460330 r2111: Fix memleak with valid names.
Jeremy.
(This used to be commit 3f0707132a)
2007-10-10 10:52:31 -05:00
Simo Sorce
804cfb20a0 r2070: Let's try to overload srnlen and strndup for AIX where they are natly broken.
(This used to be commit 98feb3318f)
2007-10-10 10:52:29 -05:00
Jeremy Allison
fcbb2d3132 r2026: Simplify statcache to use an in-memory tdb. Modify tdb to use
a customer hash function for this tdb (yes it does make a difference
on benchmarks). Remove the no longer used hash.c code.
Jeremy.
(This used to be commit 3fbadac85b)
2007-10-10 10:52:29 -05:00
Volker Lendecke
990d9d15db r2023: If there's garbage in the pidfile, we should not panic but assume that no one
else is around. We can't find the other guy anyway.

Volker
(This used to be commit bf8773b094)
2007-10-10 10:52:28 -05:00
Paul Green
3ced3cd8ae r1890: Cut down on debug messages from is_in_path. paulg
(This used to be commit 8b1c2126af)
2007-10-10 10:52:23 -05:00
Gerald Carter
1842fde7d1 r1885: tighten the cache consistency with the ntprinters.tdb entry an the in memory cache associated with open printer handles; also make sure that register_messages_flags() doesn't overwrite the originally registers flags
(This used to be commit 540daf71d8)
2007-10-10 10:52:23 -05:00
Gerald Carter
cc72b666ed r1834: prevent infinite recusion in reopen_logs() when expanding the smb.conf variable %I
(This used to be commit 08037bd442)
2007-10-10 10:52:21 -05:00
Jeremy Allison
bdab948fcf r1810: Patch from Richard Renard <rrenard@idealx.com> to store
logon hours attributes in an LDAP database.
Jeremy.
(This used to be commit dac72638fb)
2007-10-10 10:52:21 -05:00
Jeremy Allison
16de9d9711 r1684: Patch for bug #1578 based on fix from Alexander E. Patrakov,
<patrakov@ums.usu.ru>. Main change, hardcode replacement char
to '_' as I really don't want a new parameter.
Jeremy.
(This used to be commit db3dde026b)
2007-10-10 10:52:18 -05:00
Vance Lankhaar
e1df2acc04 r1656: Patch from James Peach:
> This patch is (probably) needed for all systems that don't have a
> C99/UNIX98 compliant vsnprintf by default. The builtin sm_*printf
> were no being called, causing things like talloc_init to fail, with
> predictable results.

The should fix 6 (solaris/hpux/irix) builds on the build farm.

Vance
(This used to be commit 1a33999cf0)
2007-10-10 10:52:17 -05:00
Jeremy Allison
1fed92da2f r1608: Fix from Nick THOMPSON <nickthompson@agere.com> to protect smbd
against broken filesystems which return zero blocksize.
Jeremy.
(This used to be commit 23d157a0be)
2007-10-10 10:52:16 -05:00
Volker Lendecke
ec1bbbf858 r1588: This is one of the more pathetic patches I ever checked in. Many hours of
coding have passed, but I could not find a way to get the OpenLDAP libraries
to reliably time out on any of the queries we make, *and* get correct error
returns. No, async calls and ldap_result does NOT work, or I was simply too
stupid to correctly interpret the OpenLDAP manpage and source.

We can not allow to hang indefinitely in an ldap query, especially not for
winbindd. "ldap timeout" now specifies the overall timeout for the complete
operation, that's why I increased that to 15 seconds.

Volker
(This used to be commit 269f075087)
2007-10-10 10:52:16 -05:00
Gerald Carter
0c6d7f28d6 r1570: merging changes from 3.0.5
(This used to be commit 430cf63b91)
2007-10-10 10:52:15 -05:00
Andrew Bartlett
9d0783bf21 r1492: Rework our random number generation system.
On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

Andrew Bartlett
(This used to be commit 36741d3cf5)
2007-10-10 10:52:13 -05:00
Jeremy Allison
060cb43ee4 r1425: Fix memleak in interactive mode. Reformat..
Jeremy.
(This used to be commit 5d720e52d7)
2007-10-10 10:52:11 -05:00
Jeremy Allison
d4ac326d46 r1412: Fix password history list in tdbsam. Fix some memory leaks. Add
my (C) to a header file that was at least 50% mine :-).
Jeremy.
(This used to be commit 8ee6060977)
2007-10-10 10:52:10 -05:00
Jeremy Allison
10f0c34a2a r1392: Added password history code to tdbsam backend. Not yet tested (ie. may
core dump) but compiles and links correctly. I will run the full set of
tests on the ldap sam and the tdb sam for password history tomorrow.
Jeremy.
(This used to be commit ac846420d0)
2007-10-10 10:52:09 -05:00
Jeremy Allison
1c5867502a r1388: Adding password history code for ldap backend, based on a patch from
"Jianliang Lu" <j.lu@tiesse.com>. Multi-string attribute changed to
linearised pstring due to ordering issues. A few other changes to
fix race conditions. I will add the tdb backend code next. This code
compiles but has not yet been tested with password history policy
set to greater than zero. Targeted for 3.0.6.
Jeremy.
(This used to be commit dd54b2a3c4)
2007-10-10 10:52:09 -05:00
Jeremy Allison
c531f726c4 r1325: Always use GetTimeOfDay() (wrapper). Ensure ldap replication
sleep time is not more than 5 seconds. Should fix issue
reported by Chris Garrigues <cwg@deepeddy.com>.
Jeremy.
(This used to be commit fbc06831d3)
2007-10-10 10:52:06 -05:00
Jeremy Allison
569177a194 r1317: Patch from Joe Meadows "Joe Meadows" <jameadows@webopolis.com> to
add a timeout to the ldap open calls. New parameter, ldap timeout
added.
Jeremy.
(This used to be commit e5b3094c4c)
2007-10-10 10:52:06 -05:00
Jeremy Allison
af5750d3ba r1248: Fix from Nick Wellnhofer <wellnhofer@aevum.de> to prevent
lp_interfaces() list from being corrupted.
Jeremy.
(This used to be commit c892545960)
2007-10-10 10:52:03 -05:00
Jeremy Allison
e948458a79 r1215: Intermediate checkin of the new keytab code. I need to make sure I
haven't broken krb5 ticket verification in the mainline code path,
also need to check with valgrind. Everything now compiles (MIT, need
to also check Heimdal) and the "net keytab" utility code will follow.
Jeremy.
(This used to be commit f0f2e28958)
2007-10-10 10:52:00 -05:00
Jeremy Allison
4dddfb74ae r1156: Ensure new remote arch of CIFSFS is seen.
Jeremy.
(This used to be commit 33fa4b8b27)
2007-10-10 10:51:57 -05:00
Jelmer Vernooij
f28e4f3863 r1111: Rename vsnprintf to smb_vsnprintf so we don't get duplicate symbol errors
when linking against an app that does have vsnprintf() (bug #478)
(This used to be commit 9f1c978088)
2007-10-10 10:51:55 -05:00
Volker Lendecke
53babbb519 r1106: Lars Mueller <lmuelle@suse.de> asked me to apply this patch, as this is needed
for their build environment. The AFS stuff is linux 2.4 only currently, it
works for me on this platform, so apply it.

Volker
(This used to be commit 69e8c65f1f)
2007-10-10 10:51:55 -05:00
Volker Lendecke
76ca0f6f3f r1104: get_called_name is used in the printing subsystem. In case of multi-homed
servers we need to make sure that the clients are given back the IP address
they connected to.

Volker
(This used to be commit 5f482df169)
2007-10-10 10:51:55 -05:00
Gerald Carter
7e6734a0dd r1087: BUG 1221: revert old change that used single and double quotes as delimters in next_token(), and change print_parameter() to print out parm values surrounded by double quotes (instead of single quotes)
(This used to be commit b0739b073a)
2007-10-10 10:51:54 -05:00
Jeremy Allison
2fc57c9a2c r1085: Now it's had some proper user testing, merge in the deferred open fix. I'm
still doing more testing, but it fixes a behaviour that we've been wrong
on ever since the start of Samba.
Jeremy.
(This used to be commit 894cc6d162)
2007-10-10 10:51:54 -05:00
Gerald Carter
a020879964 r993: BUG 703 -- finishing patch by Eric Boehm <boehm@nortelnetworks.com> for netgroup case lookups
(This used to be commit 82f3fee595)
2007-10-10 10:51:53 -05:00
Herb Lewis
81c497b38b r938: on an error save the original errno before calling iconv to reset
the conversion state
(This used to be commit 4a5a122b3a)
2007-10-10 10:51:50 -05:00
Gerald Carter
5a3bc12683 r907: fixing browse.dat bug -- don't include the resouce byte from the netbios name when pulling a string from a packet (jra, please double check this
(This used to be commit c9bef86b8b)
2007-10-10 10:51:48 -05:00
Herb Lewis
a30e1a4277 r772: fix cut and paste error in comment
(This used to be commit a3bb4909c3)
2007-10-10 10:51:37 -05:00
Gerald Carter
348b01ff77 r647: fix for setting the called name to by our IP if the called name was *SMBSERVER and *SMBSERV -- fixes issue with connecting to printers via \ip.ad.dr.ess\printer UNC path
(This used to be commit 8ee268f0ed)
2007-10-10 10:51:32 -05:00
Jeremy Allison
372dac6c98 r645: Patch from kawasa_r@itg.hitachi.co.jp to correctly enable core dumps.
Jeremy.
(This used to be commit ea41d69427)
2007-10-10 10:51:32 -05:00
Jeremy Allison
e0da56a848 r570: Remove lots of globals to handle case issues - move them
to connection struct entries (as they should have been from
the start). Jerry, once you've cut over to 3.0.4 release
branch I'll add this to 3.0 also.
- Jerry cut over :-).
Jeremy.
(This used to be commit 578a508509)
2007-10-10 10:51:30 -05:00
Gerald Carter
f9eda19d80 r487: fixing some compile issues with the IBM AIX compiler reoported on the ml -- now to watch the build farm some more
(This used to be commit 79fed5f5a7)
2007-10-10 10:51:26 -05:00
Gerald Carter
1b69619e6d r470: BUG 1302: fix seg fault by not trying to optimize a list of invalid gids using the wrong array size
(This used to be commit 3003769164)
2007-10-10 10:51:24 -05:00
Volker Lendecke
68938182ff r449: Two AFS-related things:
Split off the non-crypto related parts of lib/afs.c into
lib/afs_settoken.c. This makes wbinfo link without -lcrypto.

Commit vfs_afsacl.c, display & set AFS acls via the NT security editor.

Volker
(This used to be commit 43870a3fc1)
2007-10-10 10:51:23 -05:00
Herb Lewis
fc52c330ae r428: add acls debug class
(This used to be commit b7703799f8)
2007-10-10 10:51:23 -05:00
Andrew Tridgell
fc7a1ee35e r426: fixed bug noticed by wim.delvaux@adaptiveplanet.com in handling of timeout in socket connections
(This used to be commit 88278b24de)
2007-10-10 10:51:23 -05:00
Herb Lewis
9139b89259 r416: add a newline to the debuglevel message returned string
and have smbcontrol print the PID with it
(This used to be commit d3edf71885)
2007-10-10 10:51:22 -05:00
Volker Lendecke
0d6acfe19a r316: Fix split_domain_name. This defaulted to get_myname() instead of
get_global_sam_name().

Error case: Adding a domain user to a XP local group did a lsalookupname on
the user without domain prefix, and this then failed.

Jerry: This is a must-fix before 3.0.3.

Volker
(This used to be commit f35e353454)
2007-10-10 10:51:18 -05:00
Gerald Carter
ae2e649074 r288: combination of BUG 1081 and patch from J. Klinger -- added remove_duplicate_gids() to smbd and winbindd
(This used to be commit 95c68103ea)
2007-10-10 10:51:16 -05:00
Gerald Carter
8ad3d8c9b0 r196: merging struct uuid from trunk
(This used to be commit 911a28361b)
2007-10-10 10:51:13 -05:00
Gerald Carter
7af3777ab3 r116: volker's patch for local group and group nesting
(This used to be commit b393469d95)
2007-10-10 10:51:10 -05:00
Andrew Bartlett
82285f2e0e r104: Fix ntlm_auth by adding the new strhex_to_data_blob() call.
Andrew Bartlett
(This used to be commit 0693b9e79f)
2007-10-10 10:51:09 -05:00
Jim McDonough
ddc0716fa8 r91: Fix lsalookupnames. Previously we'd fail if we didn't find the name, but
we never checked if it was a domain user and didn't find a local one.
(This used to be commit 68022f5ebc)
2007-10-10 10:51:08 -05:00
Jim McDonough
a15393a3d9 r53: Remove modifyTimestamp from list of our attributes. We just check it for
cache entry time comparisons in password lockout.  Fixes problems where
pdb_ldap tries to delete the operational attribute modifyTimestamp when
deleting a user account.
(This used to be commit 5ebcb9081e)
2007-10-10 10:51:06 -05:00
Gerald Carter
931df5850e r39: * importing .cvsignore files
* updateing WHATSNEW with vl's change
(This used to be commit a7e2730ec4)
2007-10-10 10:51:05 -05: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Tim Potter
83d4d42462 Fix typo.
(This used to be commit e6e8b59f53)
2004-03-07 01:14:11 +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
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
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
Jeremy Allison
142ef0e829 Missed SAFE_FREE (typo).
Jeremy.
(This used to be commit ac1d03c05b)
2004-02-13 22:34:29 +00:00
Jeremy Allison
e3d755c5b2 Added Andrew Bartlett's patch to use an allocated buffer for count_chars.
Jeremy.
(This used to be commit cdbeb7d2eb)
2004-02-13 22:06:25 +00:00
Gerald Carter
df6d2db4ce merge from old APP_HEAD
* remove corrupt tdb and shutdown (only for printing tdbs, connections,
  sessionid & locking)
* decrement smbd counter in connections.tdb in smb_panic()
* various Makefile hack to get things to link

'max smbd processes' looks like it might be broken.  The counter KEY is not
being set.  Will look into that tomorrow.
(This used to be commit 6e22c5da92)
2004-02-12 05:24:02 +00:00
Jeremy Allison
90b5adc557 Added James Peach's fix for #1038.
Jeremy.
(This used to be commit 5379ad9824)
2004-02-11 19:07:02 +00:00
Gerald Carter
45616e18a8 more fixes from the static changes; please move static functions to the top of files to prevent this from happening
(This used to be commit 7a61c2ae45)
2004-02-10 04:02:53 +00:00
Gerald Carter
7da2745bdd bug 1046 (patch from Bostjan Golob <golob@gimb.org>); fix 20 month old bug where getpwent_list() was overoverwriting the username for entries. However the code path to the bug was introduced only on January 25
(This used to be commit ec346adf34)
2004-02-09 18:43:57 +00:00
Andrew Bartlett
8a547323d2 More 'static' work.
Andrew Bartlett
(This used to be commit 25a09004e8)
2004-02-08 11:00:25 +00:00
Andrew Bartlett
d198c55877 Make more functions static, and remove duplication in the use of functions
in lib/smbpasswd.c that were exact duplicates of functions in passdb/passdb.c

(These should perhaps be pulled back out to smbpasswd.c, but that can occour
later).

Andrew Bartlett
(This used to be commit fcdc5efb1e)
2004-02-08 08:38:42 +00:00
Andrew Bartlett
131bf59694 Another static function.
Andrew Bartlett
(This used to be commit 128c328ddb)
2004-02-08 01:30:59 +00:00
Jeremy Allison
da371e74bb Fix final valgrind errors with #830. Catch mb conversion error that may not
terminate correctly.
Jeremy.
(This used to be commit 49142c6352)
2004-02-04 20:28:51 +00:00
Jeremy Allison
ef743c0641 Fixup the allocate version of the function to do "crap" conversions too.
Embarrassing number of goto's in this :-(. Fixes #830 I think.
Jeremy.
(This used to be commit 4c182d3220)
2004-02-04 19:13:45 +00:00
Jeremy Allison
39f8afa866 Working on #830. Cope with bad conversions better - don't just memcpy but
try a crap conversion instead. Next this needs to be done to the convert_alloc
function.
Actually fixes some valgrind warnings as well - cool !
Jeremy.
(This used to be commit 6a7919f254)
2004-02-04 02:09:41 +00:00
Andrew Tridgell
7847b611ac there are places in the samba3 code that don't check properly for
packet-termination of strings. This change ensures that when we go
past the end of a packet we hit 2 null bytes, thus terminating. We are
relying on the SAFETY_MARGIN packet allocation stuff here.
(This used to be commit 655ec16828)
2004-02-02 12:09:35 +00:00
Andrew Tridgell
423ad90974 the conversion from int to size_t in charcnv did not take into account
one place where we checked "if (src_len > 0)".

I actually would greatly prefer to switch back to int for src_len. The
type *can* be negative, which means an unsigned type is
inappropriate. There is absolutely no reason why "int" should not be
used for a parameter like this.

I didn't change back to int as we are close to a release and I wanted
a mininal change, but please don't go changing types like this in
future without very careful testing and a damn good reason.

this bug broke pull_ucs2(), I would not be surprised if it caused all
sorts of nastiness. Thanks to vl for noticing the symptoms!
(This used to be commit 8b8f0c5279)
2004-02-02 12:02:43 +00:00
Jeremy Allison
2f2e5b0191 Fix up name canonicalization (needed for krb5 keytab support later).
Remove source_env handler (no longer used in any codepath).
Jeremy.
(This used to be commit 3a3e336030)
2004-01-30 18:38:48 +00:00
Andrew Bartlett
e2d301accf Clarify comment on set_effective_uid()
Andrew Bartlett
(This used to be commit ca24ae50ea)
2004-01-27 10:01:30 +00:00
Andrew Bartlett
8be4584979 Add a few more NTSTATUS <=> PAM error mappings.
Andrew Bartlett
(This used to be commit 7495cafd42)
2004-01-26 08:38:34 +00:00
Andrew Bartlett
236adfd9f4 Fix removal of attributes in LDAP - we would not actually remove the old
value in the previous code.

Andrew Bartlett
(This used to be commit c97d3eb162)
2004-01-25 00:50:39 +00:00
Volker Lendecke
aa7a675025 Fix decoding of base64. We got the length wrong when the result was not
an exact multiple of 3.

I also wrote a torture test and it survived some minutes of random stuff
coded/decoded up to 16 MB data. But that would be a bit too embarassing to
commit... :-)

Volker
(This used to be commit 6d22f0d8c3)
2004-01-23 12:04:07 +00:00
Stefan Metzmacher
fc33274a27 * Add SIGABRT to fault handling
so we now got a backtrace, if we crash
  in libldap with SIGABRT

metze
(This used to be commit b5e814294e)
2004-01-22 01:50:58 +00:00
Gerald Carter
b20f1a95a9 * BUG 446
- setup_logging() in smbclient to be interactive (remove the timestamps)
  - Fix bad return value in pull_ucs2( needs more testing to make sure this
    didn't break something else) that caused clistr_pull() to always read
    the same string from the buffer (pull_usc2() could return -1 if the original
    source length was given as -1)
  - increment some debugging messages to avoid printing them out so often
(This used to be commit 79fe75dcdf)
2004-01-15 19:03:18 +00:00
Stefan Metzmacher
d5aecd1850 * Fix sys_chown() when no chown() is presend
metze
(This used to be commit b0c0d73691)
2004-01-15 09:08:06 +00:00
Stefan Metzmacher
9343c89cb4 * Fix XFS quotas: XFS_USER_QUOTA -> USRQUOTA
XFS_GROUP_QUOTA -> GRPQUOTA
* Fix disk_free calculation with group quotas.
* Add debug class 'quota' and a lot of DEBUG()'s
  to the quota code.

metze
(This used to be commit e9e5e2036f)
2004-01-15 08:49:30 +00:00
Stefan Metzmacher
2c1f07b66a fix XFS quotas the macro changed from HAVE_XFS_QUOTA -> HAVE_XFS_QUOTAS
metze
(This used to be commit c73e845055)
2004-01-14 02:51:41 +00:00
Jeremy Allison
e82bfa5cf6 Fix for bug #922. Fast path not called for strlower_m() and strupper_m().
From ab@samba.org (Alexander Bokovoy).
Jeremy.
(This used to be commit fac9e6d712)
2004-01-07 23:21:36 +00:00
Gerald Carter
29b4959815 isolate ldap debug messages to the common smbldap_XXX() functions
(This used to be commit 7d7a262f45)
2004-01-06 18:26:18 +00:00
Jeremy Allison
67da3026a4 XFS quota patch from Stefan Metzmacher <metze@metzemix.de>.
Jeremy.
(This used to be commit cae5f158e5)
2004-01-06 18:13:32 +00:00
Andrew Bartlett
18a4994e92 Patch by Stefan Metzmacher <metze@metzemix.de>:
here's a small fix that fixes the new quota system on irix.

I need to reanable XFS quotas on irix for the new quota system
(Jerry do you want to wait for this for the release ?)

But the old system works and is the default on irix!
(This used to be commit 5d43e00a49)
2004-01-06 10:22:13 +00:00
Jeremy Allison
0d44747df9 Patch based on work from James Peach <jpeach@sgi.com> to convert over to
using pread/pwrite. Modified a little to ensure fsp->pos is correct.
Fix for #889.
Jeremy.
(This used to be commit 019aaaf0df)
2004-01-06 01:22:14 +00:00
Jeremy Allison
0014a051ee Added last missing file.
Jeremy.
(This used to be commit ffaf9982dc)
2004-01-05 21:03:12 +00:00
Jeremy Allison
2050b9a5af Oops. Broke the build. Added missing files.
Jeremy.
(This used to be commit 52eafc131e)
2004-01-05 21:02:37 +00:00
Jeremy Allison
dcbb8bd182 Fix from James Flemer <jflemer@uvm.edu> to make HAVE_ATTR_LIST linked to
HAVE_SYS_ATTRIBUTES_H to fix AIX compile.
Jeremy.
(This used to be commit 1b1c216122)
2004-01-05 21:01:08 +00:00
Jeremy Allison
31876a8478 Patch from Stefan (metze) Metzmacher <metze at metzemix.de> to revert to 2.2.x quota methods.
:-).

"here's a patch which ports the samba 2.2 samba_linux_quota.h stuff to 3_0.

This is needed because of so many broken quota files outthere.

Please, test this with old, new kernels
(strucr dqblk, struct mem_dqblk, and struct if_dqblk)
, quota.user, aquota.user formats

what is when a user is over soft quota and over hard quotas..."

Jeremy.
(This used to be commit 4350aa6ce6)
2004-01-05 19:36:02 +00:00
Andrew Bartlett
b86830a7cd Always call the auto-init funciton - this avoids tdb segfaulting under
us if we failed to open it earlier.

Andrew Bartlett
(This used to be commit 379368b0be)
2004-01-05 04:15:55 +00:00
Andrew Bartlett
5eee23cc64 auth/auth_util.c:
- Fill in the 'backup' idea of a domain, if the DC didn't supply one.  This
   doesn't seem to occour in reality, hence why we missed the typo.

lib/charcnv.c:
lib/smbldap.c:
libads/ldap.c:
libsmb/libsmbclient.c:
printing/nt_printing.c:
 - all the callers to pull_utf8_allocate() pass a char ** as the first
   parammeter, so don't make them all cast it to a void **

nsswitch/winbind_util.c:
 - Allow for a more 'correct' view of when usernames should be qualified
   in winbindd.  If we are a PDC, or have 'winbind trusted domains only',
   then for the authentication returns stip the domain portion.
 - Fix valgrind warning about use of free()ed name when looking up our
   local domain.  lp_workgroup() is maniplated inside a procedure that
   uses it's former value.  Instead, use the fact that our local domain is
   always the first in the list.

Andrew Bartlett
(This used to be commit 494781f628)
2003-12-31 00:31:43 +00:00
Volker Lendecke
0ac7dcce6b The AFS pts command always generates completely lower-case user names. As case
is not significant in windows user names we should not lose information by
lower-casing the name before handing it to AFS.

Volker
(This used to be commit 6d2285b6d1)
2003-12-30 16:00:56 +00:00
Andrew Bartlett
db088293ae Based on patch by Petri Asikainen <paca@sci.fi> fix bug #387 and #330.
This patch will change order how attributes are modified
from: add, delete
to:   delete, add

This is needed to update single valued attributes in Novell NDS and
should not harm anyone else.
(This used to be commit fabf801690)
2003-12-26 00:38:12 +00:00
Andrew Bartlett
38b17cb153 ldap rebind sleep -> ldap replication sleep
While writing documentation for metze's patch, it became clear that this is a
better name.

Andrew Bartlett
(This used to be commit 6f828ff3d3)
2003-12-25 23:11:07 +00:00
Volker Lendecke
3a1b189a9f This is metze's LDAP rebind sleep patch:
When smb.conf tells us to write to a read-only LDAP replica and we are
redirected by the LDAP server, the replication might take some seconds,
especially over slow links. This patch delays the next read after a rebind for
'ldap rebind sleep' milliseconds.

Metze, thanks for your patience.

Volker
(This used to be commit 63ffa770b6)
2003-12-25 22:42:15 +00:00
Volker Lendecke
38d0c9698f Fix our parsing of the LDAP url. We get around it as all decent systems seem
to have ldap_initialize.

Thanks to abartlet for the fix (and the bug in the first place ;-))

Volker
(This used to be commit 17473a65eb)
2003-12-25 22:29:38 +00:00
Andrew Bartlett
3b38606491 Fix bug 916 - do not perform a + -> space substitution for squid URL encoded
strings, only form input in SWAT.

Andrew Bartlett
(This used to be commit 8d54f5fe0c)
2003-12-25 09:37:41 +00:00
Jeremy Allison
b05b6046fc Patch from James Peach <jpeach@sgi.com>. Remove the MAX_CONNECTIONS limit
by increasing bitmap size. Limited by "max connections" parameter.
Bug #716.
Jeremy.
(This used to be commit fbbeb55b23)
2003-12-11 20:00:16 +00:00
Alexander Bokovoy
5760704918 Fix #558 -- support ISO-8859-1 internally. Makes Solaris users a bit happier
(This used to be commit ba95fe56d2)
2003-12-10 15:59:28 +00:00
Gerald Carter
e25b7b8eed fix bug in get_peer_name() caused by --enable-developer and using the same src & dest strings to alpha_strcpy(); reported by Michael Young
(This used to be commit b7df6849c9)
2003-12-09 18:20:27 +00:00
Gerald Carter
f141ad1a96 working on bug 687; protect against null src strings in alloc_sub_basic()
(This used to be commit 6cf91bce40)
2003-12-08 17:40:44 +00:00
Gerald Carter
67db65abf1 make sure we use a real network address in case there are extra non-zero octets in hosts allow/deny
(This used to be commit 0348e85177)
2003-12-08 17:40:15 +00:00
Gerald Carter
4b1e15a4f2 fix %a variable for Windows 2003 -> Win2K3
(This used to be commit 2f43a1c166)
2003-12-05 21:51:51 +00:00
Gerald Carter
5df2fd4175 support munged dial for ldapsam; patch from Aurlien Degrmont; bug 800
(This used to be commit 1c3c16abc9)
2003-12-04 04:52:00 +00:00
Gerald Carter
b754e4af39 don't crash on a NULL priviledge pointer; patch from Jianliang Lu
(This used to be commit 2742e813fe)
2003-12-04 04:31:29 +00:00
Jeremy Allison
c4167baca1 Get a little paranoid about memfree use in convert_string_allocate..
Looking at crash bugs #809 and others.
Jeremy.
(This used to be commit cd2075580b)
2003-12-01 22:46:46 +00:00
Gerald Carter
951e1aa851 fix inverted logic caused by s/strcmp/strequal/; host allow/deny works again; bug 846
(This used to be commit c816b44a9c)
2003-12-01 19:25:41 +00:00
Richard Sharpe
e83fc388b3 Clean up a comment noticed by Jonathan Shao@Panasas.com and remove an
obsolete comment by Luke Leighton.
(This used to be commit 316f83add7)
2003-11-26 19:15:22 +00:00
Andrew Bartlett
fcbfc7ad06 Changes all over the shop, but all towards:
- NTLM2 support in the server
 - KEY_EXCH support in the server
 - variable length session keys.

In detail:

 - NTLM2 is an extension of NTLMv1, that is compatible with existing
domain controllers (unlike NTLMv2, which requires a DC upgrade).

 * This is known as 'NTLMv2 session security' *

(This is not yet implemented on the RPC pipes however, so there may
well still be issues for PDC setups, particuarly around password
changes.  We do not fully understand the sign/seal implications of
NTLM2 on RPC pipes.)

This requires modifications to our authentication subsystem, as we
must handle the 'challege' input into the challenge-response algorithm
being changed.  This also needs to be turned off for
'security=server', which does not support this.

- KEY_EXCH is another 'security' mechanism, whereby the session key
actually used by the server is sent by the client, rather than being
the shared-secret directly or indirectly.

- As both these methods change the session key, the auth subsystem
needed to be changed, to 'override' session keys provided by the
backend.

- There has also been a major overhaul of the NTLMSSP subsystem, to merge the 'client' and 'server' functions, so they both operate on a single structure.  This should help the SPNEGO implementation.

- The 'names blob' in NTLMSSP is always in unicode - never in ascii.
Don't make an ascii version ever.

- The other big change is to allow variable length session keys.  We
have always assumed that session keys are 16 bytes long - and padded
to this length if shorter.  However, Kerberos session keys are 8 bytes
long, when the krb5 login uses DES.

 * This fix allows SMB signging on machines not yet running MIT KRB5 1.3.1. *

- Add better DEBUG() messages to ntlm_auth, warning administrators of
misconfigurations that prevent access to the privileged pipe.  This
should help reduce some of the 'it just doesn't work' issues.

- Fix data_blob_talloc() to behave the same way data_blob() does when
passed a NULL data pointer.  (just allocate)


REMEMBER to make clean after this commit - I have changed plenty of data structures...
(This used to be commit f3bbc87b0d)
2003-11-22 13:19:38 +00:00
Gerald Carter
11f4893145 Ensure that items in a list of strings containing whitespace
are written out surrounded by single quotes.  This means that
both double and single quotes are now used to surround
strings in smb.conf.  This is a slight change from the previous
behavior but needed or else things like

    printer admin = +ntadmin, 'VALE\Domain, Admin'

get written to smb.conf by SWAT.
(This used to be commit 5bf91c79d6)
2003-11-22 04:33:36 +00:00
Jeremy Allison
8614cc504e Look at error before using it in debug statement.
Jeremy.
(This used to be commit 69550332f3)
2003-11-19 22:57:56 +00:00
Rafal Szczesniak
a63010bae7 Added useful information to debug lines.
Patch by metze.


rafal
(This used to be commit 2eef3c7bc1)
2003-11-19 22:56:02 +00:00
Rafal Szczesniak
8e76781ff2 Useful debug message. Patch by metze.
rafal
(This used to be commit 8b06364b53)
2003-11-18 19:15:29 +00:00
Jeremy Allison
013a051103 Remove unneeded second open for filename ending in '.' now we know it's
a mangled name. Added const. Fix inspired by Andrew Bartlett ideas.
Jeremy.
(This used to be commit 87eb336d65)
2003-11-18 02:06:41 +00:00
Richard Sharpe
0b5019ffc9 Squelch some warnings with more casty-foo.
(This used to be commit d165a49d86)
2003-11-13 17:30:25 +00:00
Richard Sharpe
e6994778ec Fix a couple of warnings with casts.
(This used to be commit 58d7a51c57)
2003-11-13 17:27:21 +00:00
Volker Lendecke
88b0120e56 Implement %i-Macro for the locally used IP address. With this you can again
have virtual hosts with different configurations on a single smbd even on port
445.

Volker
(This used to be commit 3a7c8c4f0e)
2003-11-07 10:11:48 +00:00
Volker Lendecke
d5573ccde3 Simple rename of get_socket_addr to get_peer_addr and get_socket_name to
get_peer_name. This is to get closer to the getsockname/getpeername system
functions.

Next step will be the %i macro for the local IP address. I still want to play
%L-games in times of port 445.

Volker
(This used to be commit d7162122ea)
2003-11-07 09:03:02 +00:00
Tim Potter
764e2f7d20 Undo accidentally committed stuff.
(This used to be commit 0a79519bc4)
2003-11-06 21:55:48 +00:00
Tim Potter
0cd8bc6be4 Ignore tallocdump binary.
(This used to be commit addeb1c6c9)
2003-11-06 21:51:08 +00:00
Gerald Carter
41316b5255 make sure that we expand %H (from vl); bug 612
(This used to be commit a77f592430)
2003-11-05 04:34:31 +00:00
Tim Potter
fc809973b9 Use the actual size of the buffer in strftime instead of a made up value
which just happens to be less than sizeof(fstring).  Closes #713.
(This used to be commit 761e13da4e)
2003-11-04 20:09:44 +00:00
Jeremy Allison
b3b7cf12a0 Fix for bug #703, try lowercase netgroups lookups.
Jeremy.
(This used to be commit 8b06385e00)
2003-11-04 18:24:33 +00:00
Tim Potter
fbb8f131c2 Fix more 64-bit printf warnings.
(This used to be commit 23443e3aa0)
2003-11-03 14:34:25 +00:00
Tim Potter
0dd2e07ea5 Cast to fix warning on Solaris sendfile - check buildfarm output
to see if this works!  Bug #706.
(This used to be commit 67ab91825d)
2003-11-02 13:59:37 +00:00
Jeremy Allison
231124ced9 Fixes to check for wraps which could cause coredumps.
Jeremy.
(This used to be commit ad06edd1bb)
2003-10-29 21:28:00 +00:00
Richard Sharpe
d0833280da Some spelling mistakes in aclocal.m4 and the va_copy fixups in configure.in
and lib/snprintf. Check for va_copy first, and then look for __va_copy.
(This used to be commit 8b592740b6)
2003-10-24 16:08:03 +00:00
Volker Lendecke
4f62277d89 After a phonecall with jra finally commit this.
This changes our behaviour when the setresuid call is available. We now not
only change the effective uid but also the real uid when becoming
unprivileged. This is mainly for improved AFS compatibility, as AFS selects
the token to send to the server based on the real uid of the process.

I tested this with a W2k server with two non-root 'runas' sessions. They come
in via a single smbd as two different users using two session setups. Samba on
Linux can still switch between the two uids, proved by two different files
created via those sessions.

Volker
(This used to be commit 556c62f935)
2003-10-23 16:49:46 +00:00
Jim McDonough
a804eee9ec Volker's fix for bug #668. Change the \n after the password prompt to go
to tty instead of stdout.
(This used to be commit 3cec478b82)
2003-10-23 13:47:17 +00:00