[Samba] name resolution: dns name different to windows machine name

2010-12-20 Thread Marcus
Hi,

we are running a samba domain controller as master with activated WINS.
The machine name of each WinXP client is set manually during the
installation initial process. Each client is using the WINS server of
our domain controller. The WinXP clients are getting their IP by a
global DNS Server, which sets the DNS and reverse DNS entry identically
to the windos machine name.
 Now the administrator of the DNS server is planning to change the DNS
and reverse DNS concept in the way that the DNS and reverse DNS entry
will be not identically to the windows machine name any more. The WinXP
clients will get a generic, randomly set DNS/reverse DNS entry. 
 Does this have any effects for functionality of my samba domain
controller and/or the WinXP clients?

Thanks,
Marcus


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] problem connecting DFS-share with winXP - successful with Vista 7

2010-12-20 Thread Steffen Frömer


Hi,

i have problems connecting to DFS-Share from Client WindowsXP. Same 
configuration works fine for Windows Vista and 7. On Windows 7 the 
LMCompatibility Level is 3.


the striking point I see in logfile is following

2010/12/20 10:30:17,  1] smbd/service.c:make_connection_snum(1119)
  10.184.144.171 (10.184.144.171) signed connect to service applbin 
initially as user useracc (uid=45110, gid=45110) (pid 20312)

[2010/12/20 10:30:17,  3] smbd/sec_ctx.c:set_sec_ctx(324)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/12/20 10:30:17,  2] smbd/reply.c:reply_tcon_and_X(789)
  Serving applbin as a Dfs root
[2010/12/20 10:30:17,  3] smbd/reply.c:reply_tcon_and_X(794)
  tconX service=APPLBIN
[2010/12/20 10:30:17,  3] smbd/process.c:process_smb(1576)
  Transaction 3 of length 1404 (0 toread)
[2010/12/20 10:30:17,  3] smbd/process.c:switch_message(1393)
  switch message SMBsesssetupX (pid 20312) conn 0x0
[2010/12/20 10:30:17,  3] smbd/sec_ctx.c:set_sec_ctx(324)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2010/12/20 10:30:17,  3] smbd/sesssetup.c:reply_sesssetup_and_X(1412)
  wct=12 flg2=0xc807
[2010/12/20 10:30:17,  3] 
smbd/sesssetup.c:reply_sesssetup_and_X_spnego(1175)

  Doing spnego session setup
[2010/12/20 10:30:17,  3] 
smbd/sesssetup.c:reply_sesssetup_and_X_spnego(1210)
  NativeOS=[Windows 2002 Service Pack 3 2600] NativeLanMan=[Windows 
2002 5.1] PrimaryDomain=[]

[2010/12/20 10:30:17,  3] smbd/sesssetup.c:reply_spnego_negotiate(802)
  reply_spnego_negotiate: Got secblob of size 1172
[2010/12/20 10:30:17,  3] libads/authdata.c:decode_pac_data(301)
  Found account name from PAC: CLIENTXP$ []
[2010/12/20 10:30:17,  3] smbd/sesssetup.c:reply_spnego_kerberos(356)
  Ticket name is [client...@domain.local]
[2010/12/20 10:30:17,  1] smbd/sesssetup.c:reply_spnego_kerberos(474)
  Username DOMAIN00\CLIENTXP$ is invalid on this system
[2010/12/20 10:30:17,  3] smbd/error.c:error_packet_set(61)
  error packet at smbd/sesssetup.c(480) cmd=115 (SMBsesssetupX) 
NT_STATUS_LOGON_FAILURE



On Windows Vista the Same Section in logfile shows different 
account-name:


  Doing spnego session setup
[2010/12/20 09:12:29,  3] 
smbd/sesssetup.c:reply_sesssetup_and_X_spnego(1210)

  NativeOS=[] NativeLanMan=[] PrimaryDomain=[]
[2010/12/20 09:12:29,  3] smbd/sesssetup.c:reply_spnego_negotiate(802)
  reply_spnego_negotiate: Got secblob of size 6566
[2010/12/20 09:12:29,  3] libads/authdata.c:decode_pac_data(301)
  Found account name from PAC: USERACC [Nachname, Vorname]
[2010/12/20 09:12:29,  3] smbd/sesssetup.c:reply_spnego_kerberos(356)
  Ticket name is [user...@domain.local]


The difference i see, is that on windows XP the system don't take the 
username of connecting account, although it is grabbed in start of 
session-log.


[2010/12/20 10:30:17,  3] libads/authdata.c:decode_pac_data(301)
  Found account name from PAC: USERACC [Nachname, Vorname]
[2010/12/20 10:30:17,  3] smbd/sesssetup.c:reply_spnego_kerberos(356)
  Ticket name is [efro...@domain.local]

Has someone an idea, how i can fix this problem.
This problem only occurs, if i connect via DFS Master. If i connect 
directly to the Share, all is successful.




[complete Logfile]: http://paste.ubuntu.com/545870/
[config DFS-master]: http://paste.ubuntu.com/545874/
[config client]: http://paste.ubuntu.com/545873/


Regards,
Steffen
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Need a little help with Samba 3.5.5 on FreeNAS 7.2.5543

2010-12-20 Thread Michael Wood
On 20 December 2010 04:16, Steve B stev...@gmail.com wrote:
 1. Not sure what you mean by remote the file. I can open and read the file

I believe he meant remove.  I think he was just wondering if you got
a different error with the file missing, which would prove that
Audiotron was actually accessing the file.  If you got the same
symptoms, then it's possible that Audiotron was not actually
finding/reading the file at all.

 in any editor, but the Audiotron performs some sort of read function on the
 file that tells it there are X number of radio stations defined in the file.
 The file is basically an XML file.

-- 
Michael Wood esiot...@gmail.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] howto? howto switch domain controllers in an ldap directory?

2010-12-20 Thread John Drescher
 I've got an ldap directory, but no PDC yet.  I want to set up a test PDC,
 and once things work, I want to be able to set a more appropriate system to
 be teh PDC using teh same login informations (replica of existing authzn
 databases).  where's the documentation of how to do this?  what do I need to
 know about this process (I'm not sure what it's even called ,.,

 in case I wasn't clear above, I want to just be able to flip a switch (in
 the proverbial sense) and switch PDC on an existing ldap directory without
 having to purge it or migrate data or anything else so complex.

To switch PDCs basically all you need to do is set the ip addreess of
the ldap servers in the PDC and set the ldap password so the pdc can
connect to the ldap server.
smbpasswd -w ldap-secret

Remember that samba and ldap are independent. The PDC need not be on
the same server as your ldap servers. And I say servers you should
always maintain more than 1 ldap server. This is pretty easy to do
with ldap syncrepl

http://www.bind9.net/manual/openldap/2.3/syncrepl.html

You don't forget to configure pam and nss to use ldap on each linux
machine that is on your domain.
John
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Problem using smb_audit with samba3-3.5

2010-12-20 Thread Rafael Gomes
I don't know if I can ask here, but I don't have any answer in
official forum[1]. I really need to implement this, please help me.

I did all steps of INSTALL documentation and I got this error:

[2010/12/10 11:58:33.911661, 0] lib/module.c:59(do_smb_load_module)
Error trying to resolve symbol 'init_samba_module' in
/usr/lib64/samba/vfs/mysql_audit.so:
/usr/lib64/samba/vfs/mysql_audit.so: undefined symbol:
init_samba_module
[2010/12/10 11:58:33.911810, 0] smbd/vfs.c:167(vfs_init_custom) error
probing vfs module 'mysql_audit': NT_STATUS_UNSUCCESSFUL

Any ideas? I am really lost :(


[1] - 
http://sourceforge.net/projects/smbdaudit/forums/forum/275569/topic/4008809

Rafael Gomes
Consultor em TI
LPIC-1 MCSO
(71) 8318-0284
IV Encontro Nordestino de Software Livre  IV Encontro Potiguar de
Software Livre
http://ensl.org.br

Atenção: Este e-mail pode conter anexos no formato ODF (Open Document
Format)/ABNT (extensões odt, ods, odp, odb, odg). Antes de pedir os
anexos em outro formato, você pode instalar gratuita e livremente o
BrOffice (http://www.broffice.org).
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba upgrade HowTo requested

2010-12-20 Thread Timur I. Bakeyev
Hi, Volker!

On Sat, Dec 18, 2010 at 10:10 AM, Volker Lendecke
volker.lende...@sernet.de wrote:
 On Fri, Dec 17, 2010 at 11:26:12AM +0100, Willy Offermans wrote:

 20101026:
   AFFECTS: users of net/samba35
   AUTHOR: Timur Bakeyev ti...@freebsd.org

   This is the latest stable release of the Samba3 distribution. It has
   been extended with the experimental support of the NFS4-like ACLs on
   ZFS partitions, thanks to the sysutils/libsunacl library by Edward
   Tomasz Napierala(trasz). This support haven't been tested thoroughly,
   so try it on your own risk.

 This looks interesting. I just did a portsnap fetch update
 in my FreeBSD 8.1 box, but I don't find that snippet. Where
 can I find those patches?

There are small patches in the port itself to detect and incorporate
libsunacl via configure and build vfs_zfsacl module OOTB. As for the
lib itself - it is situated in /usr/ports/sysutils/libsunacl.

With regards,
Timur.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] winbind / trust questions and issues

2010-12-20 Thread Eric A. Hall

On 12/15/2010 4:19 PM, Eric A. Hall wrote:

 First issue is that I would like to filter out the local (LABS) users and
 groups in winbind if possible.

I tried using winbind: ignore domains = LABS but this causes winbindd to
completely ignore its own domain, which in turn causes it to freak out,
dump core, and die

I have also tried using require_membership_of=SID for CORP/Domain Users
(the remote users I want to allow local access through winbind), but
pam_winbind complains about the foreign SID and then allows everybody to
login despite the error

Anything else I could try?

-- 
Eric A. Hall  http://www.eric-a-hall.com/
Network Technology Research Grouphttp://www.ntrg.com/
Internet Core Protocols  http://www.oreilly.com/catalog/coreprot/
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba upgrade question

2010-12-20 Thread Ray Van Dolson
On Thu, Dec 16, 2010 at 07:56:55AM -0800, Chernoguz, Inessa wrote:
 Hi All,
 
 I have a problem with upgrade samba on Solaris 10 (x86). The current
 version is 3.0.25b (distributed with Solaris 10). I am trying to
 upgrade version to 3.4.5. I compiled samba from sources, has not any
 problem with make and installation. Now I have 2 different versions
 and when I am running svcadm enable samba I am receiving old
 version.  The old version installed under: /usr/sfw/sbin, new one
 under /usr/sbin...
 
 # /usr/sfw/sbin/smbd -V
 Version 3.0.25a
 # /usr/sbin/smbd -V
 Version 3.4.5
 # ps -ef | grep smbd
 root  7531  7305   0 17:55:32 pts/1   0:00 grep smbd
 root  6981  6979   0 15:19:58 ?   0:00 /usr/sfw/sbin/smbd -D
 root  6979 1   0 15:19:58 ?   0:00 /usr/sfw/sbin/smbd -D
 
 Can you, please help me here?
 
 Thanks a lot,
 Inessa

As someone already replied, you need to disable the vendor provided
Samba first:

# svcadm disable samba

Then set up SysV init scripts for your new, custom installation of
Samba or something via SMF.

Alternately, Sunfreeware or Blastwave may have pre-packaged Samba
installs that include these scripts.

I prefer sticking with the vendor-provided packages when possible (hand
built packages don't scale administratively).  The latest Sun version
of Samba is 3.0.37 for Solaris 10 and I believe they have a refresh due
out shortly.

Thanks,
Ray
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba upgrade question

2010-12-20 Thread Gaiseric Vandal

The key advantages of the Solaris provided version is that
  - someone already did the compilation work
  -  ZFS support is included (this is backported by Sun and not 
included with 3.0.x source code from samba.)

  -  nsswitch support is also enabled

The big problems I had with Sun's version  (which is why I also ended up 
recompiling)

  -  domain trusts don't always work, and the idmap functionality is buggy.


So I think 3.0.x is pretty much a dead-end at this point.  According to 
the Oracle forums, Samba 3.4.x is included with the recent Solaris 
Express release-  so I expect it to be included with Solaris 11 
(whenever that comes out.)  My guess (no evidence to back this up) is 
that Solaris 10 will stay on samba 3.0.x.  You have to make some 
changes when you change versions and if they pushed that our as an 
automatic update it could possible break things.


With the sunfreeware and blastwave versions of samba-
   -  these might be 32-bit only.
   -  I don't think zfs is included.
   -  nsswitch support may or may not be included.I had problems 
with this with sunfreeware samba in the past.




On 12/20/2010 11:34 AM, Ray Van Dolson wrote:

On Thu, Dec 16, 2010 at 07:56:55AM -0800, Chernoguz, Inessa wrote:
   

Hi All,

I have a problem with upgrade samba on Solaris 10 (x86). The current
version is 3.0.25b (distributed with Solaris 10). I am trying to
upgrade version to 3.4.5. I compiled samba from sources, has not any
problem with make and installation. Now I have 2 different versions
and when I am running svcadm enable samba I am receiving old
version.  The old version installed under: /usr/sfw/sbin, new one
under /usr/sbin...

# /usr/sfw/sbin/smbd -V
Version 3.0.25a
# /usr/sbin/smbd -V
Version 3.4.5
# ps -ef | grep smbd
 root  7531  7305   0 17:55:32 pts/1   0:00 grep smbd
 root  6981  6979   0 15:19:58 ?   0:00 /usr/sfw/sbin/smbd -D
 root  6979 1   0 15:19:58 ?   0:00 /usr/sfw/sbin/smbd -D

Can you, please help me here?

Thanks a lot,
Inessa
 

As someone already replied, you need to disable the vendor provided
Samba first:

 # svcadm disable samba

Then set up SysV init scripts for your new, custom installation of
Samba or something via SMF.

Alternately, Sunfreeware or Blastwave may have pre-packaged Samba
installs that include these scripts.

I prefer sticking with the vendor-provided packages when possible (hand
built packages don't scale administratively).  The latest Sun version
of Samba is 3.0.37 for Solaris 10 and I believe they have a refresh due
out shortly.

Thanks,
Ray
   


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Keeping Windows ACL's when migrating to SAMBA Server

2010-12-20 Thread Green International
I've tried it with the /copyall switch and /copy:datsou and still no luck
On Dec 20, 2010 6:31 PM, Andrew Masterson 
andrew.master...@nuvistaenergy.com wrote:



 -Original Message-
 From: samba-boun...@lists.samba.org
 [mailto:samba-boun...@lists.samba.org] On Behalf Of TAKAHASHI Motonobu
 Sent: Saturday, December 18, 2010 10:20 PM
 To: George
 Cc: samba@lists.samba.org; Jeremy Allison
 Subject: Re: [Samba] Keeping Windows ACL's when migrating to SAMBA
 Server

 2010/12/19 George greenadm...@gmail.com:
 Rightnow i got it half working but am having trouble with part of it.
 If I
 use robocopy, It copies the files and ACL but not the correct create
 of
 modify dates

 robocopy \\man_fs2\Batteries \\bed-fs1\servers\man_fs2\Batteries /sec
 /e

 If I use xxcopy I can copy all the files with the proper create and
 modify
 dates but it wont copy the ACL's.

 xxcopy \\man_fs2\Batteries \\bed-fs1\servers\man_fs2\Batteries /backup

 George

 

 Are you using the /COPYALL switch?

 http://www.stevelu.com/TechnicalArticles/DevTools/1206.aspx (for gory
 flag details)

 I have successfully migrated several servers with terabytes of data from
 windows to linux by using robocopy (although I don't remember the exact
 flags at the moment). xcopy is unreliable for that much data IMX.

 -=Andrew
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Keeping Windows ACL's when migrating to SAMBA Server

2010-12-20 Thread Andrew Masterson



-Original Message-
From: samba-boun...@lists.samba.org
[mailto:samba-boun...@lists.samba.org] On Behalf Of TAKAHASHI Motonobu
Sent: Saturday, December 18, 2010 10:20 PM
To: George
Cc: samba@lists.samba.org; Jeremy Allison
Subject: Re: [Samba] Keeping Windows ACL's when migrating to SAMBA
Server

2010/12/19 George greenadm...@gmail.com:
 Rightnow i got it half working but am having trouble with part of it.
If I
 use robocopy, It copies the files and ACL but not the correct create
of
 modify dates

 robocopy \\man_fs2\Batteries \\bed-fs1\servers\man_fs2\Batteries /sec
/e

 If I use xxcopy I can copy all the files with the proper create and
modify
 dates but it wont copy the ACL's.

 xxcopy \\man_fs2\Batteries \\bed-fs1\servers\man_fs2\Batteries /backup

 George



Are you using the /COPYALL switch?

http://www.stevelu.com/TechnicalArticles/DevTools/1206.aspx  (for gory
flag details)

I have successfully migrated several servers with terabytes of data from
windows to linux by using robocopy (although I don't remember the exact
flags at the moment).  xcopy is unreliable for that much data IMX.

-=Andrew
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] name resolution: dns name different to windows machine name

2010-12-20 Thread Gaiseric Vandal
I am not sure how you would have a DNS server assign random names.  But if
you aren't going to have the correct entries for the XP machine in DNS, then
you probably should not have any DNS entries for those machines.XP
machines can register their hostnames directly in DNS (if the DNS server
supports it.)  In general I don't think workstations machines need to be in
DNS at all since (unless you have shared folders or printers.)  I general
DISABLE dynamic updates in DNS and don't have DNS assignments/static IP's
for most XP machines.



-Original Message-
From: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org]
On Behalf Of Marcus
Sent: Monday, December 20, 2010 5:17 AM
To: samba@lists.samba.org
Subject: [Samba] name resolution: dns name different to windows machine name

Hi,

we are running a samba domain controller as master with activated WINS.
The machine name of each WinXP client is set manually during the
installation initial process. Each client is using the WINS server of
our domain controller. The WinXP clients are getting their IP by a
global DNS Server, which sets the DNS and reverse DNS entry identically
to the windos machine name.
 Now the administrator of the DNS server is planning to change the DNS
and reverse DNS concept in the way that the DNS and reverse DNS entry
will be not identically to the windows machine name any more. The WinXP
clients will get a generic, randomly set DNS/reverse DNS entry. 
 Does this have any effects for functionality of my samba domain
controller and/or the WinXP clients?

Thanks,
Marcus


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Ldap Users only?

2010-12-20 Thread Gaiseric Vandal
Your example is a text-book case of why you would use domains.   I am not
sure why it would be unacceptable-  since you already have a samba machine
and, from the user POV, the login process is practically the same.   The
LDAP component is for the samba backend-  you would need an LDAP backend for
samba if you have more than one domain controller, and you might want to use
LDAP backend for samba if you are already using LDAP for other stuff.   

But since windows domain model is unacceptable, the only other solution I
can think of is the use Kerberos.You can configure XP machines to use
Kerberos authentication, and then configure your linux server as a Kerberos
server. You would have to look on support.microsoft.com for instructions for
the XP side of things.Although I am then not sure how you would
configure samba to use Kerberos authentication as well.  Maybe if you
configure plaintext auth in samba so it can use the OS level authentication 



-Original Message-
From: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org]
On Behalf Of Christ Schlacta
Sent: Sunday, December 19, 2010 10:28 PM
To: samba@lists.samba.org
Subject: Re: [Samba] Ldap Users only?

firstly, I'd like to apologize, somehow we ended up off-list.

my setup looks like this:
Density: Massive file storage
rebirth: Media server (most files come from density, but it has a share 
for local files, too)
faithful: backup server (handles backups from density, rebirth, and 
other systems)  smb shares are used for laptops and desktops
(a bunch of laptops and desktops): Joining these systems to the domain 
is inconvenient, awkward, and not going to happen because we have a 
small family household, and most of them are non-techie.

the trick is, each time we change a password on a laptop or desktop, we 
have to change the corresponding passwords on all the systems.  since 
each user only uses 1-2 laptops and a desktop (my wife and I have a 
laptop and netbook each), that's simple.  Changing the server passwords 
requires logging into 3 servers over ssh, typing their old and new 
passwords, then changing their samba passwords.
I want to store all the usernames and passwords for the servers in the 
ldap directory, so that users can update their passwords once.
as I stated above, joining the end user systems to a domain is 
UNACCEPTABLE, and with one of the servers set to be master browser, I 
can set all of the systems to join the workgroup aarcane.info, and all 
the systems show up on the network view in windows 7 (and windows XP, 
and linux, and mac also.).

All I can find is howtos on using samba as an ldap-backed domain controller.
thanks, again, tms3 and everyone else for any help.

On 12/19/2010 18:20, t...@tms3.com wrote:



 On Sunday 19/12/2010 at 5:54 pm, Christ Schlacta wrote:
 actually, it's because we have a few samba servers here, it's just a 
 home,
 Honestly, I have a lab/cloud at home.  I can't for the life of me even 
 contemplate running them with out full Samba/LDAP domain mode...well, 
 I've converted over to Samba4 since August, but it is by far the 
 easiest way to manage things.
 but different machines use samba for different reasons.  as such, 
 it's a pain in the butt to have to change passwords on all systems.  
 I'm aware that we'd need to have matching unix accounts, and the plan 
 is to use 10K+ UIDs for samba users to make logging into the shell a 
 simple matter as well.  What's bugging me at the moment, is that in 
 workgroup mode, it uses the HOSTNAME
 HOSTNAME is a NETBios name, and it is based on that whole host of 
 protocols/services.  It has NOTHING to do with DNS names, or machine 
 names.
 for the domain name..  but there are several different hosts..  can I 
 just use the workgroup name and have it work?  will it be smart 
 enough to say I'm not in domain mode, so the domain doesn't matter, 
 or will I need to add a user for each host, thus mitigating any benefit?
 It would perhaps be better if you laid out what you have and are 
 doing.  I'm having a tough time understanding what you are 
 doing/having issues with.


 On 12/19/2010 17:37, t...@tms3.com wrote:




 On Sunday 19/12/2010 at 5:02 pm, Christ Schlacta wrote:

 X-SpamDetect-Info: - Start ASpam results
 ---
 X-SpamDetect-Info: This message may be spam. This message
 BODY has been altered to show you the spam information
 X-SpamDetect: ***: 3.8 sd=3.8 [96]12%-6.0(Accept Orbs)
 [212]87%5.6(!46,60) [129]44%-0.0(from_return_nomatch)
 [27]46%-0.0(X-LangGuess:English)
 X-SpamDetect-Info: - End ASpam results
 -

 how to do only users from ldap?

 Same way as domain mode...I'm assuming for workstation users to
 have access to smb shares

 You don't need to add machines to the domain, though why you
 wouldn't want to I don't know.  Then you need to have pam
 

Re: [Samba] name resolution: dns name different to windows machinename

2010-12-20 Thread tms3







--- Original message ---
Subject: Re: [Samba] name resolution: dns name different to windows 
machinename

From: Gaiseric Vandal gaiseric.van...@gmail.com
To: samba@lists.samba.org
Date: Monday, 20/12/2010  5:15 PM

I am not sure how you would have a DNS server assign random names.  
But if
you aren't going to have the correct entries for the XP machine in 
DNS, then

you probably should not have any DNS entries for those machines.XP
machines can register their hostnames directly in DNS (if the DNS 
server
supports it.)  In general I don't think workstations machines need to 
be in

DNS at all since (unless you have shared folders or printers.)
It's certainly easier when a help desk request comes in to ask the 
user for the machine name label, then try and get the machines IP 
addy. rdp://acct1  rdp://lab7 rdp://eng21 rdp://admin5


soo

But yeah, WinXP and up have no problem doing this.  dhcp can be a big 
help as well.


I general
DISABLE dynamic updates in DNS and don't have DNS assignments/static 
IP's

for most XP machines.



-Original Message-
From: samba-boun...@lists.samba.org 
[mailto:samba-boun...@lists.samba.org]

On Behalf Of Marcus
Sent: Monday, December 20, 2010 5:17 AM
To: samba@lists.samba.org
Subject: [Samba] name resolution: dns name different to windows 
machine name


Hi,

we are running a samba domain controller as master with activated 
WINS.

The machine name of each WinXP client is set manually during the
installation initial process. Each client is using the WINS server of
our domain controller. The WinXP clients are getting their IP by a
global DNS Server, which sets the DNS and reverse DNS entry 
identically

to the windos machine name.
Now the administrator of the DNS server is planning to change the DNS
and reverse DNS concept in the way that the DNS and reverse DNS entry
will be not identically to the windows machine name any more. The 
WinXP

clients will get a generic, randomly set DNS/reverse DNS entry.
Does this have any effects for functionality of my samba domain
controller and/or the WinXP clients?

Thanks,
Marcus


--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[SCM] Samba Shared Repository - branch master updated

2010-12-20 Thread Kamen Mazdrashki
The branch, master has been updated
   via  33a57db s4-pydsdb: Use local memory context in 
py_dsdb_get_oid_from_attid()
  from  e1d3de3 dnspython: Merge in new upstream.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 33a57db3a542c364eb82499e5765a2caef00af33
Author: Kamen Mazdrashki kame...@samba.org
Date:   Mon Dec 20 11:39:26 2010 +0200

s4-pydsdb: Use local memory context in py_dsdb_get_oid_from_attid()

This version reverts changes from commit 
b974966cc2b4d0b5b0d83206070b5f7c5c6495d1
and is what Matthieu Patou had commited in 
d784ecec555a3d9737e6f4b3894f27904d2b833c
with added reference to the schema cache.

I think referencing schema here is the right thing to be done
as thus we garantee that schema cache will stay in memory
for the time our function is executed

Autobuild-User: Kamen Mazdrashki kame...@samba.org
Autobuild-Date: Mon Dec 20 12:01:53 CET 2010 on sn-devel-104

---

Summary of changes:
 source4/dsdb/pydsdb.c |   20 
 1 files changed, 16 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index af03504..1a51b86 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -249,25 +249,37 @@ static PyObject *py_dsdb_get_oid_from_attid(PyObject 
*self, PyObject *args)
const char *oid;
PyObject *ret;
WERROR status;
+   TALLOC_CTX *mem_ctx;
 
if (!PyArg_ParseTuple(args, Oi, py_ldb, attid))
return NULL;
 
PyErr_LDB_OR_RAISE(py_ldb, ldb);
 
-   schema = dsdb_get_schema(ldb, NULL);
+   mem_ctx = talloc_new(NULL);
+   if (!mem_ctx) {
+   PyErr_NoMemory();
+   return NULL;
+   }
 
+   schema = dsdb_get_schema(ldb, mem_ctx);
if (!schema) {
PyErr_SetString(PyExc_RuntimeError, Failed to find a schema 
from ldb \n);
+   talloc_free(mem_ctx);
return NULL;
}

status = dsdb_schema_pfm_oid_from_attid(schema-prefixmap, attid,
-   NULL, oid);
-   PyErr_WERROR_IS_ERR_RAISE(status);
+   mem_ctx, oid);
+   if (!W_ERROR_IS_OK(status)) {
+   PyErr_SetWERROR(status);
+   talloc_free(mem_ctx);
+   return NULL;
+   }
 
ret = PyString_FromString(oid);
-   talloc_free(discard_const_p(char, oid));
+
+   talloc_free(mem_ctx);
 
return ret;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-20 Thread Günther Deschner
The branch, master has been updated
   via  9dce43a s4-smbtorture: run the winreg tests also against an added 
driver.
  from  33a57db s4-pydsdb: Use local memory context in 
py_dsdb_get_oid_from_attid()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 9dce43a809eae4b44bf1e2b301844a0753c037e9
Author: Günther Deschner g...@samba.org
Date:   Fri Dec 17 16:34:47 2010 +0100

s4-smbtorture: run the winreg tests also against an added driver.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Mon Dec 20 14:31:43 CET 2010 on sn-devel-104

---

Summary of changes:
 source4/torture/rpc/spoolss.c |   19 +++
 1 files changed, 19 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 114b3e1..630694d 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -8628,6 +8628,25 @@ static bool test_PrinterDriver_args(struct 
torture_context *tctx,
return ret;
}
 
+   {
+   struct dcerpc_pipe *p2;
+   struct policy_handle hive_handle;
+   struct dcerpc_binding_handle *b2;
+
+   torture_assert_ntstatus_ok(tctx,
+   torture_rpc_connection(tctx, p2, ndr_table_winreg),
+   could not open winreg pipe);
+   b2 = p2-binding_handle;
+
+   torture_assert(tctx, test_winreg_OpenHKLM(tctx, b2, 
hive_handle), );
+
+   ret = test_GetDriverInfo_winreg(tctx, b, NULL, NULL, 
r-driver_name, r-architecture, r-version, b2, hive_handle, server_name);
+
+   test_winreg_CloseKey(tctx, b2, hive_handle);
+
+   talloc_free(p2);
+   }
+
if (ex) {
return test_DeletePrinterDriverEx(tctx, b, server_name, 
r-driver_name, r-architecture, delete_flags, r-version);
} else {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-20 Thread Volker Lendecke
The branch, master has been updated
   via  bfc4fe4 s3: Remove unused retry from cli_start_connection
   via  d096de5 s3: Remove unused retry from cli_full_connection
   via  6601906 s3: Always retry the DC connection in auth_domain
   via  09cccee s3: Remove some unused variables
  from  9dce43a s4-smbtorture: run the winreg tests also against an added 
driver.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit bfc4fe401259085f9e17c75a7ec171be0bc5f35f
Author: Volker Lendecke v...@samba.org
Date:   Mon Dec 20 16:43:39 2010 +0100

s3: Remove unused retry from cli_start_connection

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Mon Dec 20 17:58:33 CET 2010 on sn-devel-104

commit d096de56b16c50c7cc22df08895dc29567ee15d7
Author: Volker Lendecke v...@samba.org
Date:   Mon Dec 20 16:37:23 2010 +0100

s3: Remove unused retry from cli_full_connection

commit 660190632e4f8ace65f4944f4686ea42444056c0
Author: Volker Lendecke v...@samba.org
Date:   Mon Dec 20 16:22:02 2010 +0100

s3: Always retry the DC connection in auth_domain

The only condition that cli_full_connection marks as non-retryable is the 
basic
name lookup and TCP connect. To me this is pretty fishy. For example if the
negprot fails, this is supposed to be more retryable than a NetBIOS name 
lookup
failure? I'd rather think the opposite is true.

Jeremy, this is code from 2002, 389a16d9d533. If you have any comments from
back then, let me know :-)

Volker

commit 09cccee27302044dd2fa3e94c60bf7854c4d2e45
Author: Volker Lendecke v...@samba.org
Date:   Mon Dec 20 15:58:55 2010 +0100

s3: Remove some unused variables

---

Summary of changes:
 libgpo/gpo_fetch.c  |2 +-
 source3/auth/auth_domain.c  |   12 
 source3/client/smbspool.c   |2 +-
 source3/include/proto.h |6 ++
 source3/libnet/libnet_join.c|6 +++---
 source3/libsmb/cliconnect.c |   19 ---
 source3/libsmb/libsmb_server.c  |2 +-
 source3/libsmb/trusts_util.c|5 ++---
 source3/rpc_server/srv_spoolss_nt.c |2 +-
 source3/rpcclient/cmd_spoolss.c |2 +-
 source3/rpcclient/rpcclient.c   |3 +--
 source3/torture/locktest2.c |2 +-
 source3/torture/torture.c   |8 +++-
 source3/utils/net_ads.c |2 +-
 source3/utils/net_util.c|6 +++---
 source3/utils/netlookup.c   |3 +--
 source3/utils/smbcacls.c|3 +--
 source3/utils/smbcquotas.c  |3 +--
 18 files changed, 32 insertions(+), 56 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libgpo/gpo_fetch.c b/libgpo/gpo_fetch.c
index ad6c2a8..00f9b5c 100644
--- a/libgpo/gpo_fetch.c
+++ b/libgpo/gpo_fetch.c
@@ -150,7 +150,7 @@ static NTSTATUS gpo_connect_server(ADS_STRUCT *ads, struct 
loadparm_context *lp_
ads-auth.password,
CLI_FULL_CONNECTION_USE_KERBEROS |
CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS,
-   Undefined, NULL);
+   Undefined);
if (!NT_STATUS_IS_OK(result)) {
DEBUG(10,(check_refresh_gpo: 
failed to connect: %s\n,
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index cac482c..0f541cd 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -113,8 +113,7 @@ static NTSTATUS connect_to_domain_password_server(struct 
cli_state **cli,
const char *domain,
const char *dc_name,
struct sockaddr_storage *dc_ss, 
-   struct rpc_pipe_client 
**pipe_ret,
-   bool *retry)
+   struct rpc_pipe_client 
**pipe_ret)
 {
 NTSTATUS result;
struct rpc_pipe_client *netlogon_pipe = NULL;
@@ -143,9 +142,8 @@ static NTSTATUS connect_to_domain_password_server(struct 
cli_state **cli,
}
 
/* Attempt connection */
-   *retry = True;
result = cli_full_connection(cli, global_myname(), dc_name, dc_ss, 0, 
-   IPC$, IPC, , , , 0, Undefined, retry);
+   IPC$, IPC, , , , 0, Undefined);
 
if (!NT_STATUS_IS_OK(result)) {
/* map to something more useful */
@@ -267,7 +265,6 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client *netlogon_pipe = NULL;
NTSTATUS nt_status = NT_STATUS_NO_LOGON_SERVERS;
int i;
-   bool retry = True;
 
/*
 * At this point, 

[SCM] Samba Shared Repository - branch master updated

2010-12-20 Thread Andreas Schneider
The branch, master has been updated
   via  139e2cb s3-printing: fix printer_list_traverse()
  from  bfc4fe4 s3: Remove unused retry from cli_start_connection

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 139e2cbb13ca230b65ad4b1f5ff91a795d8cca02
Author: David Disseldorp dd...@suse.de
Date:   Mon Dec 20 16:08:02 2010 +0100

s3-printing: fix printer_list_traverse()

The tdb traverse function returns the number of elements traversed, or
less than zero on error, printer_list_traverse() is incorrectly checking
for non-zero return.

Autobuild-User: Andreas Schneider a...@samba.org
Autobuild-Date: Mon Dec 20 18:44:41 CET 2010 on sn-devel-104

---

Summary of changes:
 source3/printing/printer_list.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/printer_list.c b/source3/printing/printer_list.c
index edc398b..f3f00f0 100644
--- a/source3/printing/printer_list.c
+++ b/source3/printing/printer_list.c
@@ -293,7 +293,7 @@ static NTSTATUS printer_list_traverse(printer_list_trv_fn_t 
*fn,
}
 
ret = db-traverse(db, fn, private_data);
-   if (ret != 0) {
+   if (ret  0) {
return NT_STATUS_UNSUCCESSFUL;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2010-12-20 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  eb03383 From metze's work on sparse attributes. 
FILE_ATTRIBUTE_SPARSE is valid on get but not on set. (cherry picked from 
commit e9f9e803f03be20e5f573484be7b5e7351472786)
   via  22d9791 s3-printing: fix printer_list_traverse()
  from  f1c3c4b s3: Fix bug 7066 -- wbcAuthenticateEx gives unix times

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit eb03383e8a51f489f30412f7be23aace4a36c24c
Author: Jeremy Allison j...@samba.org
Date:   Mon Dec 20 10:23:27 2010 -0800

From metze's work on sparse attributes. FILE_ATTRIBUTE_SPARSE is valid on 
get but not on set.
(cherry picked from commit e9f9e803f03be20e5f573484be7b5e7351472786)

commit 22d979142941ac4135b20c937156a83d8439fb06
Author: David Disseldorp dd...@suse.de
Date:   Mon Dec 20 16:08:02 2010 +0100

s3-printing: fix printer_list_traverse()

The tdb traverse function returns the number of elements traversed, or
less than zero on error, printer_list_traverse() is incorrectly checking
for non-zero return.

Autobuild-User: Andreas Schneider a...@samba.org
Autobuild-Date: Mon Dec 20 18:44:41 CET 2010 on sn-devel-104
(cherry picked from commit 139e2cbb13ca230b65ad4b1f5ff91a795d8cca02)

---

Summary of changes:
 source3/include/smb.h   |3 +--
 source3/printing/printer_list.c |2 +-
 source3/smbd/dosmode.c  |3 ++-
 3 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb.h b/source3/include/smb.h
index b87caf2..2b397cc 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1211,8 +1211,7 @@ struct bitmap {
FILE_ATTRIBUTE_HIDDEN|\
FILE_ATTRIBUTE_SYSTEM|\
FILE_ATTRIBUTE_DIRECTORY|\
-   FILE_ATTRIBUTE_ARCHIVE|\
-   FILE_ATTRIBUTE_SPARSE)
+   FILE_ATTRIBUTE_ARCHIVE)
 
 /* Flags - combined with attributes. */
 #define FILE_FLAG_WRITE_THROUGH0x8000L
diff --git a/source3/printing/printer_list.c b/source3/printing/printer_list.c
index edc398b..f3f00f0 100644
--- a/source3/printing/printer_list.c
+++ b/source3/printing/printer_list.c
@@ -293,7 +293,7 @@ static NTSTATUS printer_list_traverse(printer_list_trv_fn_t 
*fn,
}
 
ret = db-traverse(db, fn, private_data);
-   if (ret != 0) {
+   if (ret  0) {
return NT_STATUS_UNSUCCESSFUL;
}
 
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 628f887..2c6dcd0 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -318,7 +318,8 @@ static bool get_ea_dos_attribute(connection_struct *conn,
if (S_ISDIR(smb_fname-st.st_ex_mode)) {
dosattr |= aDIR;
}
-   *pattr = (uint32)(dosattr  SAMBA_ATTRIBUTES_MASK);
+   /* FILE_ATTRIBUTE_SPARSE is valid on get but not on set. */
+   *pattr = (uint32)(dosattr  
(SAMBA_ATTRIBUTES_MASK|FILE_ATTRIBUTE_SPARSE));
 
DEBUG(8,(get_ea_dos_attribute returning (0x%x), dosattr));
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-20 Thread Jeremy Allison
The branch, master has been updated
   via  e7707d5 From metze's work on sparse attributes. 
FILE_ATTRIBUTE_SPARSE is valid on get but not on set.
  from  139e2cb s3-printing: fix printer_list_traverse()

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit e7707d5abd7365c89405963c7cac0c0382d9179e
Author: Jeremy Allison j...@samba.org
Date:   Mon Dec 20 10:23:27 2010 -0800

From metze's work on sparse attributes. FILE_ATTRIBUTE_SPARSE is valid on 
get but not on set.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Mon Dec 20 20:11:22 CET 2010 on sn-devel-104

---

Summary of changes:
 source3/include/smb.h  |3 +--
 source3/smbd/dosmode.c |3 ++-
 2 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb.h b/source3/include/smb.h
index b87caf2..2b397cc 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1211,8 +1211,7 @@ struct bitmap {
FILE_ATTRIBUTE_HIDDEN|\
FILE_ATTRIBUTE_SYSTEM|\
FILE_ATTRIBUTE_DIRECTORY|\
-   FILE_ATTRIBUTE_ARCHIVE|\
-   FILE_ATTRIBUTE_SPARSE)
+   FILE_ATTRIBUTE_ARCHIVE)
 
 /* Flags - combined with attributes. */
 #define FILE_FLAG_WRITE_THROUGH0x8000L
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 628f887..2c6dcd0 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -318,7 +318,8 @@ static bool get_ea_dos_attribute(connection_struct *conn,
if (S_ISDIR(smb_fname-st.st_ex_mode)) {
dosattr |= aDIR;
}
-   *pattr = (uint32)(dosattr  SAMBA_ATTRIBUTES_MASK);
+   /* FILE_ATTRIBUTE_SPARSE is valid on get but not on set. */
+   *pattr = (uint32)(dosattr  
(SAMBA_ATTRIBUTES_MASK|FILE_ATTRIBUTE_SPARSE));
 
DEBUG(8,(get_ea_dos_attribute returning (0x%x), dosattr));
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2010-12-20 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  7dff32f CREATE in a compound CREATE/NOTIFY sequence was being 
passed through set_operation_credits() twice (ultimately perhaps because of bug 
7331 involving this compound sequence and the need to be ready for any incoming 
CANCEL of the NOTIFY). This had the server thinking it had granted more credit 
than it actually had, which lead to zero-credits being granted in interim 
NOTIFY responses. (cherry picked from commit 
0a9b65262c76fdad8331fbc580dbe578a403407b)
  from  eb03383 From metze's work on sparse attributes. 
FILE_ATTRIBUTE_SPARSE is valid on get but not on set. (cherry picked from 
commit e9f9e803f03be20e5f573484be7b5e7351472786)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 7dff32fb7263cfdce015ffd66ea9997685edf817
Author: Ken Harris ken.har...@mathworks.com
Date:   Mon Dec 20 10:44:48 2010 -0800

CREATE in a compound CREATE/NOTIFY sequence was being passed through 
set_operation_credits()
twice (ultimately perhaps because of bug 7331 involving this compound 
sequence and the need
to be ready for any incoming CANCEL of the NOTIFY). This had the server 
thinking it had
granted more credit than it actually had, which lead to zero-credits being 
granted in interim
NOTIFY responses.
(cherry picked from commit 0a9b65262c76fdad8331fbc580dbe578a403407b)

---

Summary of changes:
 source3/smbd/smb2_server.c |   34 +-
 1 files changed, 17 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 924e41f..025f403 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -1443,23 +1443,6 @@ static NTSTATUS smbd_smb2_request_reply(struct 
smbd_smb2_request *req)
 
req-subreq = NULL;
 
-   smb2_setup_nbt_length(req-out.vector, req-out.vector_count);
-
-   /* Set credit for this operation (zero credits if this
-  is a final reply for an async operation). */
-   smb2_set_operation_credit(req-sconn,
-   req-async ? NULL : req-in.vector[i],
-   req-out.vector[i]);
-
-   if (req-do_signing) {
-   NTSTATUS status;
-   status = smb2_signing_sign_pdu(req-session-session_key,
-  req-out.vector[i], 3);
-   if (!NT_STATUS_IS_OK(status)) {
-   return status;
-   }
-   }
-
req-current_idx += 3;
 
if (req-current_idx  req-out.vector_count) {
@@ -1482,6 +1465,23 @@ static NTSTATUS smbd_smb2_request_reply(struct 
smbd_smb2_request *req)
return NT_STATUS_OK;
}
 
+   smb2_setup_nbt_length(req-out.vector, req-out.vector_count);
+
+   /* Set credit for this operation (zero credits if this
+  is a final reply for an async operation). */
+   smb2_set_operation_credit(req-sconn,
+   req-async ? NULL : req-in.vector[i],
+   req-out.vector[i]);
+
+   if (req-do_signing) {
+   NTSTATUS status;
+   status = smb2_signing_sign_pdu(req-session-session_key,
+  req-out.vector[i], 3);
+   if (!NT_STATUS_IS_OK(status)) {
+   return status;
+   }
+   }
+
if (DEBUGLEVEL = 10) {
dbgtext(smbd_smb2_request_reply: sending...\n);
print_req_vectors(req);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-20 Thread Jeremy Allison
The branch, master has been updated
   via  09aea03 CREATE in a compound CREATE/NOTIFY sequence was being 
passed through set_operation_credits() twice (ultimately perhaps because of bug 
7331 involving this compound sequence and the need to be ready for any incoming 
CANCEL of the NOTIFY). This had the server thinking it had granted more credit 
than it actually had, which lead to zero-credits being granted in interim 
NOTIFY responses.
  from  e7707d5 From metze's work on sparse attributes. 
FILE_ATTRIBUTE_SPARSE is valid on get but not on set.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 09aea038139f8717d38f0fdae6be9cf46bd86b15
Author: Ken Harris ken.har...@mathworks.com
Date:   Mon Dec 20 10:44:48 2010 -0800

CREATE in a compound CREATE/NOTIFY sequence was being passed through 
set_operation_credits()
twice (ultimately perhaps because of bug 7331 involving this compound 
sequence and the need
to be ready for any incoming CANCEL of the NOTIFY). This had the server 
thinking it had
granted more credit than it actually had, which lead to zero-credits being 
granted in interim
NOTIFY responses.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Mon Dec 20 20:59:55 CET 2010 on sn-devel-104

---

Summary of changes:
 source3/smbd/smb2_server.c |   34 +-
 1 files changed, 17 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 924e41f..025f403 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -1443,23 +1443,6 @@ static NTSTATUS smbd_smb2_request_reply(struct 
smbd_smb2_request *req)
 
req-subreq = NULL;
 
-   smb2_setup_nbt_length(req-out.vector, req-out.vector_count);
-
-   /* Set credit for this operation (zero credits if this
-  is a final reply for an async operation). */
-   smb2_set_operation_credit(req-sconn,
-   req-async ? NULL : req-in.vector[i],
-   req-out.vector[i]);
-
-   if (req-do_signing) {
-   NTSTATUS status;
-   status = smb2_signing_sign_pdu(req-session-session_key,
-  req-out.vector[i], 3);
-   if (!NT_STATUS_IS_OK(status)) {
-   return status;
-   }
-   }
-
req-current_idx += 3;
 
if (req-current_idx  req-out.vector_count) {
@@ -1482,6 +1465,23 @@ static NTSTATUS smbd_smb2_request_reply(struct 
smbd_smb2_request *req)
return NT_STATUS_OK;
}
 
+   smb2_setup_nbt_length(req-out.vector, req-out.vector_count);
+
+   /* Set credit for this operation (zero credits if this
+  is a final reply for an async operation). */
+   smb2_set_operation_credit(req-sconn,
+   req-async ? NULL : req-in.vector[i],
+   req-out.vector[i]);
+
+   if (req-do_signing) {
+   NTSTATUS status;
+   status = smb2_signing_sign_pdu(req-session-session_key,
+  req-out.vector[i], 3);
+   if (!NT_STATUS_IS_OK(status)) {
+   return status;
+   }
+   }
+
if (DEBUGLEVEL = 10) {
dbgtext(smbd_smb2_request_reply: sending...\n);
print_req_vectors(req);


-- 
Samba Shared Repository


[SCM] Samba Website Repository - branch master updated

2010-12-20 Thread Jim McDonough
The branch, master has been updated
   via  d2e2b00 Update addresses for Conservancy
  from  932dd98 Updated entries for PrimaStasys.

http://gitweb.samba.org/?p=samba-web.git;a=shortlog;h=master


- Log -
commit d2e2b007ca9fa7c103ba24d0a0a75702831c2912
Author: Jim McDonough j...@samba.org
Date:   Mon Dec 20 15:25:14 2010 -0500

Update addresses for Conservancy

---

Summary of changes:
 donations.html |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/donations.html b/donations.html
index bc26511..bdeb9dd 100755
--- a/donations.html
+++ b/donations.html
@@ -32,9 +32,9 @@ src=https://www.paypal.com/en_US/i/btn/x-click-but21.gif; 
border=0 name=subm
 
 pre
Samba Team
-   c/o The Software Freedom Conservancy
-   1995 BROADWAY FL 17
-   NEW YORK NY 10023-5882
+   c/o Software Freedom Conservancy, Inc.
+   137 Montague St Ste 380
+   Brooklyn, NY 11201-3548
 /pre
 
 br
@@ -47,7 +47,7 @@ the USA, so donations in the USA may be tax-deductible./p
 pIf you would like to make a larger corporate donation then we would 
certainly
 like to discuss that. Please send a email to 
 a
-href=mailto:conserva...@softwarefreedom.org;conserva...@softwarefreedom.org/a
+href=mailto:donat...@sfconservancy.org;donat...@sfconservancy.org/a
 or talk to any Samba Team member./p
 
 h3Why do we need money?/h3


-- 
Samba Website Repository


[SCM] Samba Shared Repository - branch v3-6-test updated

2010-12-20 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  132c57d Added call out to a Linux-compatible fallocate() when we 
need to extend a file allocation extent without changing end-of-file size. 
(cherry picked from commit 00d2d16262909fde2c144a504d7d554767b7fd45)
  from  7dff32f CREATE in a compound CREATE/NOTIFY sequence was being 
passed through set_operation_credits() twice (ultimately perhaps because of bug 
7331 involving this compound sequence and the need to be ready for any incoming 
CANCEL of the NOTIFY). This had the server thinking it had granted more credit 
than it actually had, which lead to zero-credits being granted in interim 
NOTIFY responses. (cherry picked from commit 
0a9b65262c76fdad8331fbc580dbe578a403407b)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit 132c57df21571ad0400e3d26e5e0a0db3a9d9fd7
Author: Jeremy Allison j...@samba.org
Date:   Mon Dec 20 16:53:16 2010 -0800

Added call out to a Linux-compatible fallocate() when we need to extend a 
file
allocation extent without changing end-of-file size.
(cherry picked from commit 00d2d16262909fde2c144a504d7d554767b7fd45)

---

Summary of changes:
 source3/configure.in  |   35 +++
 source3/include/proto.h   |1 +
 source3/lib/system.c  |   35 +++
 source3/modules/vfs_default.c |5 +++--
 source3/smbd/vfs.c|   13 -
 5 files changed, 86 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 5f81a19..c772f58 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -741,6 +741,7 @@ AC_CHECK_HEADERS(sys/syslog.h syslog.h)
 AC_CHECK_HEADERS(langinfo.h locale.h)
 AC_CHECK_HEADERS(xfs/libxfs.h)
 AC_CHECK_HEADERS(netgroup.h)
+AC_CHECK_HEADERS(linux/falloc.h)
 
 AC_CHECK_HEADERS(rpcsvc/yp_prot.h,,,[[
 #if HAVE_RPC_RPC_H
@@ -1095,6 +1096,7 @@ AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset 
innetgr setnetgrent getnetg
 AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf)
 AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf stat64 fstat64)
 AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt lseek64 ftruncate64 
posix_fallocate posix_fallocate64)
+AC_CHECK_FUNCS(fallocate fallocate64)
 AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam)
 AC_CHECK_FUNCS(opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64)
 AC_CHECK_FUNCS(getpwent_r)
@@ -2563,6 +2565,39 @@ fi
 fi
 # end utmp details
 
+AC_CACHE_CHECK([for linux fallocate],samba_cv_HAVE_LINUX_FALLOCATE,[
+AC_TRY_COMPILE([
+#if defined(HAVE_UNISTD_H)
+#include unistd.h
+#endif
+#include sys/types.h
+#define _GNU_SOURCE
+#include fcntl.h
+#if defined(HAVE_LINUX_FALLOC_H)
+#include linux/falloc.h
+#endif],
+[int ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 10);],
+samba_cv_HAVE_LINUX_FALLOCATE=yes,samba_cv_HAVE_LINUX_FALLOCATE=no)])
+if test x$samba_cv_HAVE_LINUX_FALLOCATE = xyes  test 
x$ac_cv_func_fallocate = xyes; then
+AC_DEFINE(HAVE_LINUX_FALLOCATE,1,[Whether the Linux 'fallocate' function 
is available])
+fi
+
+AC_CACHE_CHECK([for linux fallocate64],samba_cv_HAVE_LINUX_FALLOCATE64,[
+AC_TRY_COMPILE([
+#if defined(HAVE_UNISTD_H)
+#include unistd.h
+#endif
+#include sys/types.h
+#define _GNU_SOURCE
+#include fcntl.h
+#if defined(HAVE_LINUX_FALLOC_H)
+#include linux/falloc.h
+#endif],
+[int ret = fallocate64(0, FALLOC_FL_KEEP_SIZE, 0, 10);],
+samba_cv_HAVE_LINUX_FALLOCATE64=yes,samba_cv_HAVE_LINUX_FALLOCATE64=no)])
+if test x$samba_cv_HAVE_LINUX_FALLOCATE64 = xyes  test 
x$ac_cv_func_fallocate64 = xyes; then
+AC_DEFINE(HAVE_LINUX_FALLOCATE64,1,[Whether the Linux 'fallocate64' 
function is available])
+fi
 
 ICONV_LOOK_DIRS=/usr /usr/local /sw /opt
 AC_ARG_WITH(libiconv,
diff --git a/source3/include/proto.h b/source3/include/proto.h
index e26f43e..8b2ba95 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -888,6 +888,7 @@ int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf,
  bool fake_dir_create_times);
 int sys_ftruncate(int fd, SMB_OFF_T offset);
 int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len);
+int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, 
SMB_OFF_T len);
 SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence);
 int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence);
 SMB_OFF_T sys_ftell(FILE *fp);
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 1c00ad8..d5b833c 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -695,6 +695,41 @@ int sys_posix_fallocate(int fd, SMB_OFF_T offset, 
SMB_OFF_T len)
 }
 
 /***
+ An fallocate() function that matches the semantics of the Linux one.

[SCM] Samba Shared Repository - branch master updated

2010-12-20 Thread Jeremy Allison
The branch, master has been updated
   via  8998f4b Added call out to a Linux-compatible fallocate() when we 
need to extend a file allocation extent without changing end-of-file size.
  from  09aea03 CREATE in a compound CREATE/NOTIFY sequence was being 
passed through set_operation_credits() twice (ultimately perhaps because of bug 
7331 involving this compound sequence and the need to be ready for any incoming 
CANCEL of the NOTIFY). This had the server thinking it had granted more credit 
than it actually had, which lead to zero-credits being granted in interim 
NOTIFY responses.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 8998f4b01310e4b45e75d8d5f3260b5ba5c1cdf9
Author: Jeremy Allison j...@samba.org
Date:   Mon Dec 20 16:53:16 2010 -0800

Added call out to a Linux-compatible fallocate() when we need to extend a 
file
allocation extent without changing end-of-file size.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Tue Dec 21 02:41:24 CET 2010 on sn-devel-104

---

Summary of changes:
 source3/configure.in  |   35 +++
 source3/include/proto.h   |1 +
 source3/lib/system.c  |   35 +++
 source3/modules/vfs_default.c |5 +++--
 source3/smbd/vfs.c|   13 -
 5 files changed, 86 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index b43d0b3..ed99b17 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -741,6 +741,7 @@ AC_CHECK_HEADERS(sys/syslog.h syslog.h)
 AC_CHECK_HEADERS(langinfo.h locale.h)
 AC_CHECK_HEADERS(xfs/libxfs.h)
 AC_CHECK_HEADERS(netgroup.h)
+AC_CHECK_HEADERS(linux/falloc.h)
 
 AC_CHECK_HEADERS(rpcsvc/yp_prot.h,,,[[
 #if HAVE_RPC_RPC_H
@@ -1095,6 +1096,7 @@ AC_CHECK_FUNCS(sigprocmask sigblock sigaction sigset 
innetgr setnetgrent getnetg
 AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf)
 AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf stat64 fstat64)
 AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt lseek64 ftruncate64 
posix_fallocate posix_fallocate64)
+AC_CHECK_FUNCS(fallocate fallocate64)
 AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam)
 AC_CHECK_FUNCS(opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64)
 AC_CHECK_FUNCS(getpwent_r)
@@ -2563,6 +2565,39 @@ fi
 fi
 # end utmp details
 
+AC_CACHE_CHECK([for linux fallocate],samba_cv_HAVE_LINUX_FALLOCATE,[
+AC_TRY_COMPILE([
+#if defined(HAVE_UNISTD_H)
+#include unistd.h
+#endif
+#include sys/types.h
+#define _GNU_SOURCE
+#include fcntl.h
+#if defined(HAVE_LINUX_FALLOC_H)
+#include linux/falloc.h
+#endif],
+[int ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 10);],
+samba_cv_HAVE_LINUX_FALLOCATE=yes,samba_cv_HAVE_LINUX_FALLOCATE=no)])
+if test x$samba_cv_HAVE_LINUX_FALLOCATE = xyes  test 
x$ac_cv_func_fallocate = xyes; then
+AC_DEFINE(HAVE_LINUX_FALLOCATE,1,[Whether the Linux 'fallocate' function 
is available])
+fi
+
+AC_CACHE_CHECK([for linux fallocate64],samba_cv_HAVE_LINUX_FALLOCATE64,[
+AC_TRY_COMPILE([
+#if defined(HAVE_UNISTD_H)
+#include unistd.h
+#endif
+#include sys/types.h
+#define _GNU_SOURCE
+#include fcntl.h
+#if defined(HAVE_LINUX_FALLOC_H)
+#include linux/falloc.h
+#endif],
+[int ret = fallocate64(0, FALLOC_FL_KEEP_SIZE, 0, 10);],
+samba_cv_HAVE_LINUX_FALLOCATE64=yes,samba_cv_HAVE_LINUX_FALLOCATE64=no)])
+if test x$samba_cv_HAVE_LINUX_FALLOCATE64 = xyes  test 
x$ac_cv_func_fallocate64 = xyes; then
+AC_DEFINE(HAVE_LINUX_FALLOCATE64,1,[Whether the Linux 'fallocate64' 
function is available])
+fi
 
 ICONV_LOOK_DIRS=/usr /usr/local /sw /opt
 AC_ARG_WITH(libiconv,
diff --git a/source3/include/proto.h b/source3/include/proto.h
index dabb315..566b3f3 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -888,6 +888,7 @@ int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf,
  bool fake_dir_create_times);
 int sys_ftruncate(int fd, SMB_OFF_T offset);
 int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len);
+int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, 
SMB_OFF_T len);
 SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence);
 int sys_fseek(FILE *fp, SMB_OFF_T offset, int whence);
 SMB_OFF_T sys_ftell(FILE *fp);
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 02322b7..4cf6a29 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -695,6 +695,41 @@ int sys_posix_fallocate(int fd, SMB_OFF_T offset, 
SMB_OFF_T len)
 }
 
 /***
+ An fallocate() function that matches the semantics of the Linux one.
+/
+
+#ifdef HAVE_LINUX_FALLOC_H
+#include linux/falloc.h

[SCM] Samba Shared Repository - branch v3-6-test updated

2010-12-20 Thread Jeremy Allison
The branch, v3-6-test has been updated
   via  a2956e7 Keep track of the sparse status of an open file handle. 
Allows bypass of strict allocation on sparse files. Files opened as POSIX opens 
are always sparse. (cherry picked from commit 
3db2614ccd1948792cc403f0302c7516319461b2)
  from  132c57d Added call out to a Linux-compatible fallocate() when we 
need to extend a file allocation extent without changing end-of-file size. 
(cherry picked from commit 00d2d16262909fde2c144a504d7d554767b7fd45)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -
commit a2956e7d2b66a828d7355841bcb3edfe188a12d3
Author: Jeremy Allison j...@samba.org
Date:   Mon Dec 20 17:58:33 2010 -0800

Keep track of the sparse status of an open file handle. Allows bypass of
strict allocation on sparse files. Files opened as POSIX opens are always
sparse.
(cherry picked from commit 3db2614ccd1948792cc403f0302c7516319461b2)

---

Summary of changes:
 source3/include/smb.h |1 +
 source3/modules/vfs_default.c |2 +-
 source3/smbd/dosmode.c|2 ++
 source3/smbd/fileio.c |3 ++-
 source3/smbd/open.c   |9 +
 5 files changed, 15 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb.h b/source3/include/smb.h
index 2b397cc..8d12fb9 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -344,6 +344,7 @@ typedef struct files_struct {
bool initial_delete_on_close; /* Only set at NTCreateX if file was 
created. */
bool delete_on_close;
bool posix_open;
+   bool is_sparse;
struct smb_filename *fsp_name;
 
struct vfs_fsp_data *vfs_extension;
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 54f38c3..9cca349 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -895,7 +895,7 @@ static int vfswrap_ftruncate(vfs_handle_struct *handle, 
files_struct *fsp, SMB_O
 
START_PROFILE(syscall_ftruncate);
 
-   if (lp_strict_allocate(SNUM(fsp-conn))) {
+   if (lp_strict_allocate(SNUM(fsp-conn))  !fsp-is_sparse) {
result = strict_allocate_ftruncate(handle, fsp, len);
END_PROFILE(syscall_ftruncate);
return result;
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 2c6dcd0..cf95348 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -911,6 +911,8 @@ NTSTATUS file_set_sparse(connection_struct *conn,
 FILE_NOTIFY_CHANGE_ATTRIBUTES,
 fsp-fsp_name-base_name);
 
+   fsp-is_sparse = sparse;
+
return NT_STATUS_OK;
 }
 
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index aec6554..da40013 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -128,7 +128,8 @@ static ssize_t real_write_file(struct smb_request *req,
 ret = vfs_write_data(req, fsp, data, n);
 } else {
fsp-fh-pos = pos;
-   if (pos  lp_strict_allocate(SNUM(fsp-conn))) {
+   if (pos  lp_strict_allocate(SNUM(fsp-conn) 
+   !fsp-is_sparse)) {
if (vfs_fill_sparse(fsp, pos) == -1) {
return -1;
}
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 80756d6..32a08b5 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2221,6 +2221,15 @@ static NTSTATUS open_file_ntcreate(connection_struct 
*conn,
}
}
 
+   /* Determine sparse flag. */
+   if (posix_open) {
+   /* POSIX opens are sparse by default. */
+   fsp-is_sparse = true;
+   } else {
+   fsp-is_sparse = (file_existed 
+   (existing_dos_attributes  FILE_ATTRIBUTE_SPARSE));
+   }
+
/*
 * Take care of inherited ACLs on created files - if default ACL not
 * selected.


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-20 Thread Andrew Tridgell
The branch, master has been updated
   via  4820c97 dns: fixed the padding for dnsp_name fields in LDAP
   via  049a16c dns: auto-calculate the wDataLength field in DNS records
   via  8c04657 s4-dns: fixed a crash bug in dlz_bind9 code
   via  b9a2852 dnsp: fixed parsing of dns_name structures
  from  8998f4b Added call out to a Linux-compatible fallocate() when we 
need to extend a file allocation extent without changing end-of-file size.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 4820c97e9ea00e73f3188f9834a03913ed74df80
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Dec 21 11:59:54 2010 +1100

dns: fixed the padding for dnsp_name fields in LDAP

all names are NUL terminated, but may have additional padding as well

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Dec 21 03:26:26 CET 2010 on sn-devel-104

commit 049a16c8ef475f6b327292d231022fd4c5aaddf1
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Dec 21 11:59:05 2010 +1100

dns: auto-calculate the wDataLength field in DNS records

we need this for creating new records

commit 8c04657600cd6702dbfc66744fe2268c59ebea0b
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Dec 21 11:57:50 2010 +1100

s4-dns: fixed a crash bug in dlz_bind9 code

we need to keep el_ctx for the next part of the loop

commit b9a2852fdd68a0691ff567557824be44bb08b27a
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Dec 15 23:52:32 2010 +1100

dnsp: fixed parsing of dns_name structures

its not a pad byte, its a trailing zero

---

Summary of changes:
 librpc/idl/dnsp.idl|4 ++--
 librpc/ndr/ndr_dnsp.c  |   25 -
 source4/dns_server/dlz_bind9.c |2 --
 3 files changed, 22 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/dnsp.idl b/librpc/idl/dnsp.idl
index 905e420..eed0c47 100644
--- a/librpc/idl/dnsp.idl
+++ b/librpc/idl/dnsp.idl
@@ -92,7 +92,7 @@ interface dnsp
dnsp_name   nameTarget;
} dnsp_srv;
 
-   typedef [nodiscriminant] union {
+   typedef [nodiscriminant,gensize] union {
[case(DNS_TYPE_A)] [flag(NDR_BIG_ENDIAN)]   ipv4address ipv4;
[case(DNS_TYPE_NS)] dnsp_name ns;
[case(DNS_TYPE_CNAME)]  dnsp_name cname;
@@ -109,7 +109,7 @@ interface dnsp
/* this is the format for the dnsRecord attribute in the DNS
   partitions in AD */
typedef [public] struct {
-   uint16  wDataLength;
+   [value(ndr_size_dnsRecordData(data,wType,ndr-flags))] uint16 
wDataLength;
dns_record_type wType;
uint32  dwFlags;
uint32  dwSerial;
diff --git a/librpc/ndr/ndr_dnsp.c b/librpc/ndr/ndr_dnsp.c
index 256638a..ae78425 100644
--- a/librpc/ndr/ndr_dnsp.c
+++ b/librpc/ndr/ndr_dnsp.c
@@ -36,14 +36,16 @@ _PUBLIC_ void ndr_print_dnsp_name(struct ndr_print *ndr, 
const char *name,
 */
 _PUBLIC_ enum ndr_err_code ndr_pull_dnsp_name(struct ndr_pull *ndr, int 
ndr_flags, const char **name)
 {
-   uint8_t len, count;
+   uint8_t len, count, termination;
int i;
-   uint32_t total_len;
+   uint32_t total_len, raw_offset;
char *ret;
 
NDR_CHECK(ndr_pull_uint8(ndr, ndr_flags, len));
NDR_CHECK(ndr_pull_uint8(ndr, ndr_flags, count));
 
+   raw_offset = ndr-offset;
+
ret = talloc_strdup(ndr-current_mem_ctx, );
if (!ret) {
return ndr_pull_error(ndr, NDR_ERR_ALLOC, Failed to pull 
dnsp);
@@ -68,19 +70,32 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dnsp_name(struct 
ndr_pull *ndr, int ndr_flag
ret[newlen-1] = 0;
total_len = newlen;
}
+   NDR_CHECK(ndr_pull_uint8(ndr, ndr_flags, termination));
+   if (termination != 0) {
+   return ndr_pull_error(ndr, NDR_ERR_ALLOC, Failed to pull dnsp 
- not NUL terminated);
+   }
+   if (ndr-offset  raw_offset + len) {
+   return ndr_pull_error(ndr, NDR_ERR_ALLOC, Failed to pull dnsp 
- overrun by %u bytes,
+ ndr-offset - (raw_offset + len));
+   }
+   /* there could be additional pad bytes */
+   while (ndr-offset  raw_offset + len) {
+   uint8_t pad;
+   NDR_CHECK(ndr_pull_uint8(ndr, ndr_flags, pad));
+   }
(*name) = ret;
-   NDR_PULL_ALIGN(ndr, 2);
return NDR_ERR_SUCCESS;
 }
 
 enum ndr_err_code ndr_push_dnsp_name(struct ndr_push *ndr, int ndr_flags, 
const char *name)
 {
int count, total_len, i;
+
/* count the dots */
for (count=i=0; name[i]; i++) {
if (name[i] == '.') count++;
}

[SCM] Samba Shared Repository - branch master updated

2010-12-20 Thread Jeremy Allison
The branch, master has been updated
   via  0a5f4f5 Keep track of the sparse status of an open file handle. 
Allows bypass of strict allocation on sparse files. Files opened as POSIX opens 
are always sparse.
  from  4820c97 dns: fixed the padding for dnsp_name fields in LDAP

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 0a5f4f523fe3dcb90033ee53c838ad6030f608b4
Author: Jeremy Allison j...@samba.org
Date:   Mon Dec 20 17:58:33 2010 -0800

Keep track of the sparse status of an open file handle. Allows bypass of
strict allocation on sparse files. Files opened as POSIX opens are always
sparse.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Tue Dec 21 04:12:22 CET 2010 on sn-devel-104

---

Summary of changes:
 source3/include/smb.h |1 +
 source3/modules/vfs_default.c |2 +-
 source3/smbd/dosmode.c|2 ++
 source3/smbd/fileio.c |3 ++-
 source3/smbd/open.c   |9 +
 5 files changed, 15 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb.h b/source3/include/smb.h
index 2b397cc..8d12fb9 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -344,6 +344,7 @@ typedef struct files_struct {
bool initial_delete_on_close; /* Only set at NTCreateX if file was 
created. */
bool delete_on_close;
bool posix_open;
+   bool is_sparse;
struct smb_filename *fsp_name;
 
struct vfs_fsp_data *vfs_extension;
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 54f38c3..9cca349 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -895,7 +895,7 @@ static int vfswrap_ftruncate(vfs_handle_struct *handle, 
files_struct *fsp, SMB_O
 
START_PROFILE(syscall_ftruncate);
 
-   if (lp_strict_allocate(SNUM(fsp-conn))) {
+   if (lp_strict_allocate(SNUM(fsp-conn))  !fsp-is_sparse) {
result = strict_allocate_ftruncate(handle, fsp, len);
END_PROFILE(syscall_ftruncate);
return result;
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 2c6dcd0..cf95348 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -911,6 +911,8 @@ NTSTATUS file_set_sparse(connection_struct *conn,
 FILE_NOTIFY_CHANGE_ATTRIBUTES,
 fsp-fsp_name-base_name);
 
+   fsp-is_sparse = sparse;
+
return NT_STATUS_OK;
 }
 
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index aec6554..da40013 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -128,7 +128,8 @@ static ssize_t real_write_file(struct smb_request *req,
 ret = vfs_write_data(req, fsp, data, n);
 } else {
fsp-fh-pos = pos;
-   if (pos  lp_strict_allocate(SNUM(fsp-conn))) {
+   if (pos  lp_strict_allocate(SNUM(fsp-conn) 
+   !fsp-is_sparse)) {
if (vfs_fill_sparse(fsp, pos) == -1) {
return -1;
}
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 80756d6..32a08b5 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2221,6 +2221,15 @@ static NTSTATUS open_file_ntcreate(connection_struct 
*conn,
}
}
 
+   /* Determine sparse flag. */
+   if (posix_open) {
+   /* POSIX opens are sparse by default. */
+   fsp-is_sparse = true;
+   } else {
+   fsp-is_sparse = (file_existed 
+   (existing_dos_attributes  FILE_ATTRIBUTE_SPARSE));
+   }
+
/*
 * Take care of inherited ACLs on created files - if default ACL not
 * selected.


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-20 Thread Andrew Bartlett
The branch, master has been updated
   via  446f8a1 s4-auth Ensure that we always copy across domain groups
   via  6f7423c s4-auth Remove duplicate copies of session_info creation 
code
   via  1961d7a s4-auth rework session_info handling not to require an auth 
context
   via  94a59b7 s4-auth Remove event context from privilage database 
handling
   via  becaa18 s4-auth Remove obsolete comment
   via  912faf1 s4:dsdb/schema/schema_* - adaptions needed for removed 
const on OIDs
   via  ef618f5 s4:lib/ldb-samba/ldif_handlers.c - adaption needed for 
removed const on OIDs
   via  13fa674 s3/s4:auth SPNEGO - adaptions for the removed const from 
OIDs
   via  464b8fa librpc/ndr/ndr_*.c - remove const from OIDs
   via  3b591ca lib/util/asn1.c - remove the const specifier from OID
   via  32bae10 s4:dsdb/common/util.c - remove unused variable ndr_err
   via  89522ea s4:auth/gensec/spnego.c - remove unused variable principal
  from  0a5f4f5 Keep track of the sparse status of an open file handle. 
Allows bypass of strict allocation on sparse files. Files opened as POSIX opens 
are always sparse.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 446f8a163cfdcfb2c4bb2b8b8adc720bf96c05a5
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Dec 21 14:08:34 2010 +1100

s4-auth Ensure that we always copy across domain groups

Even if we can't calculate the local groups (because we don't have a
local SAM to do it with) we still need to include the domain groups in
the session_info token.

Andrew Bartlett

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Tue Dec 21 05:56:22 CET 2010 on sn-devel-104

commit 6f7423c7f1cc3a4596a955a90f315ffbf1025c3b
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Dec 21 11:43:04 2010 +1100

s4-auth Remove duplicate copies of session_info creation code

We now just do or do not call into LDB based on some flags.

This means there may be some more link time dependencies, but we seem
to deal with those better now.

Andrew Bartlett

commit 1961d7a4119200b8a4ad7b0207e0cdcf2e10d3f8
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Dec 21 10:19:53 2010 +1100

s4-auth rework session_info handling not to require an auth context

This reverts a previous move to have this based around the auth
subsystem, which just spread auth deps all over unrelated code.

Andrew Bartlett

commit 94a59b781ccc5a552a9141484740255977db4637
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Dec 20 21:26:35 2010 +1100

s4-auth Remove event context from privilage database handling

These local TDB operations can quite safely be handled in a new/nested
event context, rather than using the main event context.

Andrew Bartlett

commit becaa18a46f4ee14d8617c22e78da463fda823b2
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Dec 20 16:07:40 2010 +1100

s4-auth Remove obsolete comment

The code that this referred to went away in September with
7dbfeb0dc040889244a1110940af2d070f823374

Andrew Bartlett

commit 912faf1b080736a4855e3ea99b49f0ccbf76af33
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 19 16:37:04 2010 +0100

s4:dsdb/schema/schema_* - adaptions needed for removed const on OIDs

commit ef618f577870f28b8efd472a87d4dcf094d67d29
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 19 16:36:16 2010 +0100

s4:lib/ldb-samba/ldif_handlers.c - adaption needed for removed const on 
OIDs

commit 13fa6743d86ef6e51b3243cf3045242850358b43
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Dec 15 17:17:09 2010 +0100

s3/s4:auth SPNEGO - adaptions for the removed const from OIDs

This is needed in order to suppress warnings.

commit 464b8fa3173de7cc801195a28b84786cb1c63833
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Dec 15 17:21:04 2010 +0100

librpc/ndr/ndr_*.c - remove const from OIDs

commit 3b591caed00790c5d21b8774c7af87357c329d1c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Dec 15 17:02:49 2010 +0100

lib/util/asn1.c - remove the const specifier from OID

There is no reason to have it const since it's an allocated thing.

commit 32bae1051272e805e290e49dffb25e4a635ffdfb
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Dec 19 16:30:10 2010 +0100

s4:dsdb/common/util.c - remove unused variable ndr_err

commit 89522ea5b17dea91608ca49c58bfe7d802e0638e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Dec 15 17:43:45 2010 +0100

s4:auth/gensec/spnego.c - remove unused variable principal

---

Summary of changes:
 lib/util/asn1.c  |   17 ++--
 lib/util/asn1.h