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

2184 Commits

Author SHA1 Message Date
Jeremy Allison
f692694b99 Remove PSTRING_LEN from smbd/ nmbd/.
Remove pstring from libsmb/clidfs.c except for a nasty
hack (that will be removed when pstrings are gone from
client/).
Jeremy.
(This used to be commit cc257b71d13daa47e6f2315d0f07a60eb4aaeca6)
2007-11-29 17:25:41 -08:00
Jeremy Allison
d2cf97aeba Remove the explicit TALLOC_CTX * from cli_struct.
Make us very explicit about how long a talloc ctx
should last.
Jeremy.
(This used to be commit ba9e2be2b5a59684e854609f9d82ea1633448c62)
2007-11-29 13:24:54 -08:00
Jeremy Allison
42c87fe6e6 Remove pstrings. Ensure we validate offsets.
Jeremy.
(This used to be commit ff06cc34e66a18ba71dd54f6c78b05a45b9f2d85)
2007-11-29 13:24:14 -08:00
Jeremy Allison
eced14c6e6 Remove unused code (and pstring).
Jeremy.
(This used to be commit a261a61226248b41be22dd4f2873b5ed82bc2a24)
2007-11-28 14:08:49 -08:00
Jeremy Allison
3daafc5662 Remove pstrings from asn1.c.
Jeremy.
(This used to be commit 82f393e60378eb42ddcc740241902eee495719d3)
2007-11-27 23:40:54 -08:00
Jeremy Allison
762fde90a0 Remove pstrings from namequery.c.
Jeremy.
(This used to be commit 71ccd0c42e0ae66172ca5797be3d3a01f4a67a69)
2007-11-27 23:10:20 -08:00
Volker Lendecke
1011b32678 Remove some statics
(This used to be commit 1fab16ffb888cd4ec18e52d9da33976a67a5d104)
2007-11-27 14:18:47 +01:00
Volker Lendecke
bff221cf1b In libsmbclient, map NT_STATUS_OBJECT_PATH_NOT_FOUND to ENOENT
Thanks to SATOH Fumiyasu!

This fixes bug 4974
(This used to be commit 41e07682dc1fa535ddaf405efa26fabb33c8bbf9)
2007-11-25 12:54:52 +01:00
Volker Lendecke
d2c2635a28 Make remote_password_change return malloced error strings
This fixes a segfault in smbpasswd -r
(This used to be commit 49949f0b85007c7c2b3c340c12f3d18909862135)
2007-11-23 13:04:50 -08:00
Jeremy Allison
de51d3dd5f More pstring removal....
Jeremy.
(This used to be commit 809f5ab4c595740b28425e1667e395a6058b76a8)
2007-11-20 18:55:36 -08:00
Jeremy Allison
cae4c742a8 Always check return from push_ascii.
Jeremy.
(This used to be commit 9c3d10521e691169cfbb8b728f123911c3c970ae)
2007-11-19 17:43:28 -08:00
Volker Lendecke
428e663100 Add stackframes to public libsmbclient functions
As we use talloc_tos() in inner libsmbclient/ functions more and more, we need
to make sure not to create memleaks by not free'ing talloc stackframes. This
patch wraps all calls in libsmbclient.c that are publically exported into a
talloc_stackframe()/talloc_free() pair.

Jeremy, Derrell, can you check this?

Thanks,

Volker
(This used to be commit db9fa472a89eb78a7b1f7cabcf195331c3b448d9)
2007-11-19 16:42:03 -08:00
Jeremy Allison
9a41314ce8 Remove pstring from nmbd.
Jeremy.
(This used to be commit a317f70c229f7730279eaa323f7ebfd499257f76)
2007-11-19 15:15:09 -08:00
Jeremy Allison
68be9a8200 More pstring removal. This one was tricky. I had to add
one horror (pstring_clean_name()) which will have to
remain until I've removed all pstrings from the client code.
Jeremy.
(This used to be commit 1ea3ac80146b83c2522b69e7747c823366a2b47d)
2007-11-15 14:19:52 -08:00
Jeremy Allison
79266500cd Remove all pstrings from smbd/chgpasswd.c.
Jeremy.
(This used to be commit eaf14c701b08e9eff5b94bf57af68cb29142d7fc)
2007-11-12 15:02:50 -08:00
Volker Lendecke
6069670f1b Some pstring removal
Hi!

Feel free to push :-)

Volker

From 7fae6b3709a973bd0a5a13d3f5c880c61d5e35de Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl@sernet.de>
Date: Sun, 11 Nov 2007 15:28:59 +0100
Subject: [PATCH] Remove some static pstrings
(This used to be commit c3a66b4ee97a902c5cf43c3bb145541849a029ed)
2007-11-11 21:34:40 -08:00
Volker Lendecke
63d141d4e8 Remove a static fstring
Feel free to push :-)

Volker
(This used to be commit f213556f50de4a28b5c5d2e1e762013837feb722)
2007-11-11 13:16:58 -08:00
Volker Lendecke
50d9b94f6f Remove a static fstring
I'm not sure why this used to be static, to me it seems that every time this
variable is overwritten. I just don't see how name_status_find() could return
true and not overwrite name. Can someone please review this and potentially
check it in?

Thanks,

Volker
(This used to be commit 329c688e4a9e69b71996fd1b0eee2202a849f3f5)
2007-11-11 13:14:06 -08:00
Volker Lendecke
637f9d9bf0 Fix some warnings
(This used to be commit 0a1f524e8cce9bbe4fd10467c1f64f7a8862d298)
2007-11-09 15:16:26 +01:00
Volker Lendecke
e63bcdd720 Remove the silly "user_socket_options" global variable
This is better done with a 'lp_do_parameter(-1, "socket options", ..);
(This used to be commit 814bed029efa391e664ac432d0d68dfeab26381f)
2007-11-09 15:11:54 +01:00
Volker Lendecke
9e5ef9a874 pstring removal
(This used to be commit 0ee896827215a24e70a4ac6bde5ded13f9497296)
2007-11-09 15:11:27 +01:00
Jeremy Allison
5f4693d8f8 Remove more pstring/fstrings.
Jeremy.
(This used to be commit 7a1de5b44e84a7474e78518c6ba33b3fedc42b5f)
2007-11-08 18:50:07 -08:00
Jeremy Allison
d40e47db4b Remove more fstring/pstring bad useage. Go talloc !
Jeremy.
(This used to be commit 2a0173743d2cf615d52278f3dd87cc804abe2d16)
2007-11-08 17:25:45 -08:00
Stefan Metzmacher
380840d588 add win_errstr() as wrapper of dos_errstr().
this makes merging stuff from samba4 easier

metze
(This used to be commit cfbdb133b998a704c6c167b9b4b56370f4ff666d)
2007-11-08 14:33:04 +01:00
Jeremy Allison
7498e1b8c0 Ensure we don't use massive writes in pipe mode.
Jeremy.
(This used to be commit 47640fb20e42f226e7ea104076fd52547bfe1abb)
2007-11-06 14:12:38 -08:00
Jeremy Allison
36441da424 Remove the horror that was the global smb_rw_error.
Each cli struct has it's own local copy of this variable,
so use that in client code. In the smbd server, add one
static to smbd/proccess.c and use that inside smbd. Fix
a bunch of places where smb_rw_error could be set by
calling read_data() in places where we weren't reading
from the SMB client socket (ie. winbindd).
Jeremy.
(This used to be commit 255c2adf7b6ef30932b5bb9f142ccef4a5d3d0db)
2007-11-05 11:12:56 -08:00
Jeremy Allison
73d4079680 Remove the smb_read_error global variable and replace
it with accessor functions. "One global or pstring a day...." :-).
Jeremy.
(This used to be commit d50d14c300abc83b7015718ec48acc8b3227a273)
2007-11-03 15:12:42 -07:00
Jeremy Allison
329365684b Change the client library to write directly out of
the incoming buffer in the non-signed case. Speeds
up writes by over 10% or so. Complete the server
recvfile implementation.
Jeremy.
(This used to be commit 81ca5853b2475f123faab3b550f0a7b24ae3c208)
2007-11-02 12:21:34 -07:00
Volker Lendecke
0e073b8152 Fix for bug 5021
This is a different fix than the bug reporter (Evgeniy Dushistov
<dushistov at mail.ru>, thanks!) created, but it lives without the boolean
status variable. Untested so far, but I can not add attachments to bugs right
now. But to me this looks really obvious.
(This used to be commit b481abf5914dcafe5642c4d9394d02603e905bbb)
2007-11-01 13:59:35 -07:00
Jeremy Allison
f5dcac6e8e Our userlevel SMBwriteX call is non-standard in that it
sometimes uses a 12-word write and doesn't include a pad
byte (as Windows does). Fix this so that we are identical
to Windows clients. This will make recvfile processing
much easier to detect (as we can just read a standard
writeX header length to decide).
Jeremy.
(This used to be commit 3d3d1b806aef3617abaac46daf230ed32076e2ce)
2007-10-30 12:54:39 -07:00
Jeremy Allison
32dd016353 Fix the setup_kaddr() call to cope with IPv6.
This is the last obvious change I can see. At
this point we can start claiming IPv6 support
(Hurrah !:-).
Jeremy.
(This used to be commit bda8c0bf571c994b524a9d67eebc422033d17094)
2007-10-29 15:03:36 -07:00
Jeremy Allison
e2d0526c97 Change our DNS code to cope with AAAA records. A6 records
look like a nightmare to use, so ignore them for now.
Jeremy.
(This used to be commit 814daded90781dc5a5bdd522ea8cfe5d47e6d7a7)
2007-10-29 13:34:00 -07:00
Jeremy Allison
d4307679b9 Change all occurrences of zero_addr(&ss,AF_INET) to
zero_addr(&ss). All current uses were always of the
AF_INET form, so simplify the call. If in the future
we need to zero an addr to AF_INET6 this can be
done separately.
Jeremy.
(This used to be commit 2e92418a138bf2738b77b7e0fcb2fa37ad84fc0c)
2007-10-27 20:29:36 -07:00
Jeremy Allison
fc91aa6988 Move the horrible hack for link local addresses out of namequery.c
and into util_sock.c. is_ipaddress() now copes with link:local:v6%ifname
addresses, as does interpret_string_addr().
Jeremy
(This used to be commit a3f7db3d30ced566c8340696914f1be3293a9c5b)
2007-10-26 16:03:20 -07:00
Jeremy Allison
6128d116b3 Fix resolve name to resolve IPv6 addresses of link-local%ifaddr
Jeremy.
(This used to be commit e6609cab732d5cd5cc9a5ae50aee15147f2ec6ec)
2007-10-25 18:28:36 -07:00
Jeremy Allison
4da94864dd Fix cast typo - would have broken all dgram sends.
Jeremy.
(This used to be commit 17ea899f39e80241afa235cb933695ba6bae846a)
2007-10-25 18:15:02 -07:00
Jeremy Allison
f88b7a076b This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
(This used to be commit 98e154c3125d5732c37a72d74b0eb5cd7b6155fd)
2007-10-24 14:16:54 -07:00
Gerald (Jerry) Carter
13bf4c4bb7 Fix a crash in resolve_hosts() caused by an out-of-bounds array reference.
(This used to be commit fd28d09a95b31bdbc6babd13c5a4ed9fc9ef4bfd)
2007-10-19 15:08:40 -05:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-18 17:40:25 -07:00
Karolin Seeger
4d910553dc Add net rap file user
(This used to be commit 2972c97e5e676964585de930601f083c19080735)
2007-10-18 13:12:58 +02:00
Jeremy Allison
666f50b01f Move to protocol independent code in most of lib/util_sock.c
We don't use gethostbyname any more except in one case where
we're looking for host aliases (I don't know how to do that
with getaddrinfo yet). New function should be getaddrinfo().
Next step will be fixing lib/access.c, and then changing
libsmb/namequery.c to cope with IPv6 address returns.
Jeremy.
(This used to be commit 4a56b697b6adcf095e25895c4a9ba3192ed34124)
2007-10-15 16:11:48 -07:00
Günther Deschner
06ae5243f3 Add WERR_SERVICE_ALREADY_RUNNING.
Guenther
(This used to be commit 357f00384994946485a5190b6a9c493aeee53cd2)
2007-10-15 19:10:19 +02:00
Jeremy Allison
8e54530b52 Add start of IPv6 implementation. Currently most of this is avoiding
IPv6 in winbindd, but moves most of the socket functions that were
wrongly in lib/util.c into lib/util_sock.c and provides generic
IPv4/6 independent versions of most things. Still lots of work
to do, but now I can see how I'll fix the access check code.
Nasty part that remains is the name resolution code which is
used to returning arrays of in_addr structs.
Jeremy.
(This used to be commit 3f6bd0e1ec5cc6670f3d08f76fc2cd94c9cd1a08)
2007-10-10 18:25:16 -07:00
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
2007-10-10 15:34:30 -05:00
Volker Lendecke
b92212575d r25538: Revert r25533
(This used to be commit 1e02208c43cb27ca4b43d268a7f0324f2a9b2cfd)
2007-10-10 12:31:12 -05:00
Volker Lendecke
9d1a95ac9c r25533: remove a pstring
(This used to be commit 0f2552e20fb66b0b80006a8a7b999ccf6f54c656)
2007-10-10 12:31:12 -05:00
Jeremy Allison
3dbb3d4c26 r25510: Now we're returning the port instead of using a global,
remember to use ntohs. Hopefully will fix the build farm.
Jeremy.
(This used to be commit 5174acccb589edbfbe4ba633f4178f7200d7d6c4)
2007-10-10 12:31:11 -05:00
Jeremy Allison
0d87820380 r25492: Start adding IPv6 compatible code to lib/util_sock.c and deal with
the ripple effects this causes. utmp has to change etc. Remove some
global varables and store address/port in the unexpected db.
Jeremy.
(This used to be commit 18c6a2211d9e25233d01715b3f78977edcd6d869)
2007-10-10 12:31:09 -05:00
Gerald Carter
5221ebb299 r25407: Revert Longhorn join patch as it is not correct for the 3.2 tree.
The translate_name() used by cli_session_setup_spnego() cann rely
Winbindd since it is needed by the join process (and hence before
Winbind can be run).
(This used to be commit 00a93ed336c5f36643e6e33bd277608eaf05677c)
2007-10-10 12:31:03 -05:00
Gerald Carter
3529156971 r25400: Windows 2008 (Longhorn) Interop fixes for AD specific auth2 flags,
and client fixes.  Patch from Todd Stetcher <todd.stetcher@isilon.com>.
(This used to be commit 8304ccba7346597425307e260e88647e49081f68)
2007-10-10 12:31:02 -05:00