Re: [Samba] ldap sub groups and Samba

2011-06-20 Thread Daniel Müller
What?!!! Are you trying to do?!!!
Why do you want Domain Admins only to manage a few groups?
Smbldap-tools is never complicated. If you are only in windows (techs as you
mentioned :-)) stay there. I think if you are a administrator you should do
more then only have a nice gui and know nothing about a command line and
other os then windows.
If you need a samba serving the ads tools then go ahead and install samba4.

Good luck
Daniel

---
EDV Daniel Müller

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen

Tel.: 07071/206-463, Fax: 07071/206-499
eMail: muel...@tropenklinik.de
Internet: www.tropenklinik.de
---
-Ursprüngliche Nachricht-
Von: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org] Im
Auftrag von Christ Schlacta
Gesendet: Samstag, 18. Juni 2011 09:00
An: samba@lists.samba.org
Betreff: Re: [Samba] ldap sub groups and Samba

On 6/16/2011 16:14, Juan Diego Calle wrote:
 Hi,

 I have a RHEL 5.6 server with samba3x-3.5.4-0.70 instaled, it acts as a
PDC, it has OpenLDAP in the same server.  Everything works fine, so far, the
windows xp and windows 7 machines are inside the domain, and users from the
ldap can log from their machines.  The thing is that i am trying to create
groups, so some users can administrate others users, but not all the users.

 I know that samba does support administration through usrmng.exe or some
other windows tools, so the Domain Admins should be able to administrate all
the user.  I talked to many people and googled around and I understood that
the samba schema wont support groups of people that administer some users,
either you are a Domain Admin or Domain User, and Domain Admins have all the
administrative privileges, maybe I am wrong I tried using the usrmng.exe and
some other tools over windows 7 and I couldnt make them work so I stop
trying to manage the users through any Windows Tools.
 Is it possible to use Domain Admins to manage only some groups?

 Because everyone told me that the above is not possible, I tried another
approach, with OpenLdap, PHPLDAPAdmin and acls.  (I need to have a graphical
interface, the people that will manage this groups of users are windows
techs, so anything from command line like smbldap-tools or anything else
seems uber complicated)
 I created groups on my openldap and with acls the users where able to
administer some users, it still needs more testing. I was trying to create
nested groups with Domain Users, and my users but then I thought of the
following.
 Instead of nested groups can I create a sub group of Domain Users, and
user that belongs to that group will log to the Domain?

 I am trying this on a Virtual Machine, but my Windows 7 machine died, and
I havent being able to test this.

 Having an group on my ldap like this

 dn: cn=Grupo de Prueba,cn=Domain Users,ou=Group,dc=mydomain,dc=com
 objectClass: groupOfNames
 objectClass: top
 cn: Grupo de Prueba
 member: uid=prueba,ou=People,dc=mydomain,dc=com

 Will the user prueba be able to log on to the samba Domain? Or the user
has to be part of the Domain Users directly in order to log on to the
Domain.

 Thanks,

 Juan Diego
there's no reason they can't be domain users also, and just not have any 
user admins for that group.

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


[Samba] How do i get file attributes using samba.

2011-06-20 Thread naga_kishore_kommuri
Hi,
I need to extract the following attributes of a file in Windows share using 
samba.

/* FileAttributesField */
#define FILE_ATTRIBUTE_READONLY 0x001L
#define FILE_ATTRIBUTE_HIDDEN   0x002L
#define FILE_ATTRIBUTE_SYSTEM   0x004L
#define FILE_ATTRIBUTE_DIRECTORY    0x010L
#define FILE_ATTRIBUTE_ARCHIVE  0x020L
#define FILE_ATTRIBUTE_NORMAL   0x080L
#define FILE_ATTRIBUTE_TEMPORARY    0x100L
#define FILE_ATTRIBUTE_SPARSE   0x200L
#define FILE_ATTRIBUTE_REPARSE_POINT    0x400L
#define FILE_ATTRIBUTE_COMPRESSED   0x800L
#define FILE_ATTRIBUTE_OFFLINE  0x1000L
#define FILE_ATTRIBUTE_NONINDEXED   0x2000L
#define FILE_ATTRIBUTE_ENCRYPTED    0x4000L
#define SAMBA_ATTRIBUTES_MASK   0x7F


Which API of samba library should I use to extract these attributes of a file.

Thanks 

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


Re: [Samba] howto cache 'root' password for net commands?

2011-06-20 Thread Volker Lendecke
On Sun, Jun 19, 2011 at 08:34:11PM -0700, Linda Walsh wrote:
 I have a minorly complicated root password that is hard to type correctly,
 quicklyyet samba 'seems' to be  encouraging me to create a
 simple one in order to do managagement on the server via 'net'
 
 I don't like to type the password more than once, the more times I
 type it, the more times it can be either monitored, or seen, or
 whatever...
 
 So am I doing something incorrectly in my server management -- because
 one has to run as 'root' to manage things with the net command, so you've
 already typed in the password -- but then it asks you to type in the password
 again.
 
 Even windows save credentials under your loginso why is 'net' re-asking
 me root's password, when it knows I am running as root?   (when I don't, it
 says most things won't work (and they don't))...so how to cache?
 
 Or is there some setting I've munged to create this problem for myself?
 
 (certainly not inconceivable... ;-) )...

Try to start winbind, then

wbinfo --ccache-save

and

net --use-ccache

Haven't tested that for a while, so it might not work. But
it's supposed to :-)

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-37-0, fax: +49-551-37-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Sticky bit problem

2011-06-20 Thread David Aldrich
 -Original Message-
 From: Linda Walsh [mailto:sa...@tlinx.org]
 Sent: 20 June 2011 04:24
 To: David Aldrich; Samba mailing list
 Subject: Re: Sticky bit problem
 
 Linda Walsh wrote:
  David Aldrich wrote:
  Hi
 
  We are building a Linux app under Centos 5.3, using gnu make 3.81 and
  gcc 4.12.  The working directory is on a remote machine and is either
  a Samba share or a Windows 7 share.  We find that in the case of a
  Windows 7 share the resulting executable has the sticky bit set in group:
 
  On Windows 7 share:
 
  -rwxrwSrwx 1 snip myapp
  T is the sticky bit, S is the SxID bit
 
  BUT, a cap S, means the execute bit isn't set. so theoretically,
  someone in the same group wouldn't be able to access any files or
  subdirs but they could, theoretically read the names of the files...
 -
 Forget what I said above --  you said it was on an executable, not on a dir.
 
 
 the cap S means the execute bit isn't set.   If the 'SGID' AND the
 execute bit are set then it's a lowercase 's'
 
 So of course, someone in whatever group shoudln't
 be able to execute it since the execute bit is 'off'.
 
 if the SGID bit is 'on', it should force whoever executes the file
 into that group (while they are running that program) (if they aren't
 already)you may not want that...  but apparently, over CIFS, the
 SGID bit isn't being transmitted anywaythe permissions just look
 odd on the CIFS client...it shouldn't show it as group executable.
 
 What that is really saying on 'linux' is that anyone in that group can't
 execute it.
 
 The user can, group cannot, everyone else can

Hi Linda

Thanks for your reply.

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


[Samba] Accessing directory in UNIX from Windows Platform!

2011-06-20 Thread Kanagaraj S
Hi Mike,
Greeting for the day!

Just wanted to know the steps involved in Configuring SAMBA server
with the UNIX Server.

My requirement:

1. There are files in the directory of an UNIX Server

2. Need to access those files from the Windows Platform.

My queries on SAMBA:

1. How the link ( kind of URL ) to those files in SAMBA Server looks like?

2. Can we have access to the files in just a Click of that URL?


YOUR HELP IS MUCH APPRECIATED!!!

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


Re: [Samba] Accessing directory in UNIX from Windows Platform!

2011-06-20 Thread Dermot
On 20 June 2011 11:56, Kanagaraj S raj.kana...@gmail.com wrote:

 My queries on SAMBA:

 1. How the link ( kind of URL ) to those files in SAMBA Server looks like?


\\samba-server-nebios-name-or-ip-address\share-name

 2. Can we have access to the files in just a Click of that URL?

Yes. Read the docs and potential values for the security parameter in smb.conf.

http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/samba-pdc.html#id2564901

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


Re: [Samba] group_mapping.tdb error upon Samba upgrade

2011-06-20 Thread Willy Offermans
Hello Timur and Samba friends,

I have done what you suggested. However group_mapping.tdb is renamed to
group_mapping.tdb.upgraded again. To me it looks like some update 
mechanism cannot finalise and got stuck at some point. Any help to 
overcome this problem is still welcome!

On Mon, Jun 20, 2011 at 04:35:26AM +0200, Timur I. Bakeyev wrote:
 I'd try to rename that *.upgraded file to the normal one, possibly
 preserving a copy somewhere.
 
 On Fri, Jun 3, 2011 at 10:21 AM, Willy Offermans
 wi...@offermans.rompen.nlwrote:
 
  Dear Samba friends,
 
  I have recently upgraded from Samba 3.0.36 to Samba 3.5.6. After upgrade I
  encounter the following error in log.smbd:
 
  [2011/06/03 10:09:43,  0] smbd/server.c:1119(main) smbd version 3.5.6
  started.  Copyright Andrew Tridgell and the Samba Team 1992-2010
  [2011/06/03 10:09:43.379106,  1] param/loadparm.c:7605(lp_do_parameter)
  WARNING: The share modes option is deprecated
  [2011/06/03 10:09:43.379286,  1] param/loadparm.c:7605(lp_do_parameter)
  WARNING: The printer admin option is deprecated
  [2011/06/03 10:09:43.401015,  1] smbd/files.c:193(file_init) file_init:
  Information only: requested 16384 open files, 7129 are available.
  [2011/06/03 10:12:20, 0] lib/util_tdb.c:tdb_log(664)
  tdb(/var/db/samba/group_mapping.tdb): tdb_reopen: open failed (No such file
  or directory)
  [2011/06/03 10:12:20, 0] lib/util.c:reinit_after_fork(3319) tdb_reopen_all
  failed.  [2011/06/03 10:12:20, 0] smbd/server.c:open_sockets_smbd(570)
  reinit_after_fork failed.
  [2011/06/03 10:12:20, 0] lib/util.c:smb_panic(1633) PANIC (pid 20164):
  reinit_after_fork failed.
  [2011/06/03 10:12:20, 0] lib/util.c:log_stack_trace(1737) BACKTRACE: 4
  stack frames: #0 0x122b9fd smb_panic+93 at /usr/local/sbin/smbd #1
  0x12ef709 main+5945 at /usr/local/sbin/smbd #2 0x104abdb _start+203 at
  /usr/local/sbin/smbd #3 0x104ab25 _start+21 at /usr/local/sbin/smbd
  [2011/06/03 10:12:20, 0] lib/fault.c:dump_core(181) dumping core in
  /var/log/samba/cores/smbd
 
  when issuing the following command:
 
  smbclient -L localhost
  Enter password:
  protocol negotiation failed: NT_STATUS_PIPE_BROKEN
 
  I noticed that there is a file called
  /var/db/samba/group_mapping.tdb.upgraded
  but no /var/db/samba/group_mapping.tdb
 
  Samba 3.5.6 is running on FreeBSD 8.1-RELEASE #1
 
  What is going on?
 
  Do you need more information to solve this issue?
 
 
  --
  Met vriendelijke groeten,
  With kind regards,
  Mit freundlichen Gruessen,
 
  Willy
 
  *
   W.K. Offermans
  Home:   +31 45 544 49 44
  Mobile: +31 681 15 87 68
  e-mail: wi...@offermans.rompen.nl
  --
  To unsubscribe from this list go to the following URL and read the
  instructions:  https://lists.samba.org/mailman/options/samba
 

-- 
Met vriendelijke groeten,
With kind regards,
Mit freundlichen Gruessen,
De jrus wah,

Willy

*
Dr. W.K. Offermans
CAT Postdoctoral Fellow
CAT Catalytic Center
Institut f�r Technische und Makromolekulare Chemie
RWTH Aachen
Worringerweg 1, Raum 38C-150
D-52074 Aachen, Germany
Phone:  +49 241 80 28592
Fax:+49 241 80 22593
Home:   +31 45 544 49 44
Mobile: +31 681 15 87 68
e-mail: wi...@offermans.rompen.nl
e-mail: willy.offerm...@catalyticcenter.rwth-aachen.de

   Powered by 

(__)
 \\\'',)
   \/  \ ^
   .\._/_)

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

[Samba] Remove obsolete sambaPwdMustChange and sambaKickoffTime from LDAP database

2011-06-20 Thread Willy Offermans
Dear Samba friends,

From the information I have found on the internet, I understood that
sambaPwdMustChange and sambaLogoffTime are obsolete. When there is no use
for these attributes in the future, I would recommend to remove them from
the samba scheme. What would be the procedure to follow to remove these
attributes and to update the ldap database?

-- 
Met vriendelijke groeten,
With kind regards,
Mit freundlichen Gruessen,

Willy

*
W.K. Offermans
Home:   +31 45 544 49 44
Mobile: +31 681 15 87 68
e-mail: wi...@offermans.rompen.nl
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] convert_string_talloc: Conversion error: Incomplete multibyte sequence

2011-06-20 Thread John Drescher
My users are having a lot of problems since I upgraded a samba domain
member server from samba-3.0.37 to 3.5.X. The main issue seems to be a
very long delay loading office files (sometimes minutes if the file
loads at all) and a lot of read only errors and users not being able
to save. I have found that rebooting the client, restarting samba, or
killing the users smbd process regains access to the file that the
user wanted. In the logs I see a lot of the following errors:

[2011/06/20 10:50:14.147340,  3] lib/charcnv.c:645(convert_string_talloc)
  convert_string_talloc: Conversion error: Incomplete multibyte sequence(FB^?)
[2011/06/20 10:50:14.147507,  3] lib/charcnv.c:645(convert_string_talloc)
  convert_string_talloc: Conversion error: Incomplete multibyte sequence(FB^?)


Are these really errors or should I ignore this?

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


[Samba] net ads user info .vs. wbinfo -g ?

2011-06-20 Thread John McNulty
The group names from these two commands display differently.   For example:

$  net ads user info my-name -U my-name
 .
 .
Systems Engineering EU


$ wbinfo -g
 .
 .
systemsengineeringeu.write


Why is this different?

Regards,

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


Re: [Samba] convert_string_talloc: Conversion error: Incomplete multibyte sequence

2011-06-20 Thread TAKAHASHI Motonobu
From: John Drescher dresche...@gmail.com
Date: Mon, 20 Jun 2011 11:07:19 -0400

 My users are having a lot of problems since I upgraded a samba domain
 member server from samba-3.0.37 to 3.5.X. 

(snip)

 In the logs I see a lot of the following errors:
 
 [2011/06/20 10:50:14.147340,  3] lib/charcnv.c:645(convert_string_talloc)
   convert_string_talloc: Conversion error: Incomplete multibyte 
 sequence(FB^?)

 Are these really errors or should I ignore this?

Have you correctly set dos charset and unix charset parameter? 
Or have you correcly linked libiconv or iconv with Samba?

---
TAKAHASHI Motonobu mo...@monyo.com / @damemonyo
  http://damedame.monyo.com/ / http://facebook.com/monyot
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.3.15 Ignoring Logon Path and Logon Home to Disable Roaming Profiles

2011-06-20 Thread TAKAHASHI Motonobu
From: Charles Kozler char...@fixflyer.com
Date: Fri, 17 Jun 2011 12:17:51 -0400

 I would like to disable the roaming profiles capability but it appears 
 that no matter what I said, it is being ignored by Samba.
 
 First is my relevant snippet for the Logon Path and Logon Home being 
 empty as described in the documentation.  Then, following that, is my 
 entire smb.conf -- please let me know if you see any reason as to why 
 Samba would be ignoring the parameters and still attempting a roaming 
 profile logon.

You have to remove these settings from users already created when you
changed logon hone and logon path parameters to empty one.

You can see current configuration of a user:
  pdbedit -v a-user

---
TAKAHASHI Motonobu mo...@samba.gr.jp / @damemonyo
  http://damedame.monyo.com/ / http://facebook.com/monyot
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] convert_string_talloc: Conversion error: Incomplete multibyte sequence

2011-06-20 Thread John Drescher
On Mon, Jun 20, 2011 at 1:23 PM, TAKAHASHI Motonobu mo...@monyo.com wrote:
 From: John Drescher dresche...@gmail.com
 Date: Mon, 20 Jun 2011 11:07:19 -0400

 My users are having a lot of problems since I upgraded a samba domain
 member server from samba-3.0.37 to 3.5.X.

 (snip)

 In the logs I see a lot of the following errors:

 [2011/06/20 10:50:14.147340,  3] lib/charcnv.c:645(convert_string_talloc)
   convert_string_talloc: Conversion error: Incomplete multibyte 
 sequence(FB^?)

 Are these really errors or should I ignore this?

 Have you correctly set dos charset and unix charset parameter?

here is what I have for charset

WARNING: You have some share names that are longer than 12 characters.
These may not be accessible to some older clients.
(Eg. Windows9x, WindowsMe, and smbclient prior to Samba 3.0.)
Server role: ROLE_DOMAIN_MEMBER
dos charset = CP850
unix charset = UTF-8
display charset = LOCALE

 Or have you correcly linked libiconv or iconv with Samba?


I will look into that. This is on gentoo so I did build samba from source.

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


Re: [Samba] Restricting logins using pam_winbind require_membership_of ?

2011-06-20 Thread TAKAHASHI Motonobu
On 06/17/2011 12:28 PM, John McNulty wrote:
 Hi.

 I have some shares on a server that are offered to specific Active Directory
 user groups, but the business doesn't want those users to be able to login
 to the server.  If I were to add require_membership_of  to pam_winbind to
 limit logins and shut out the users I don't want, would it also have the
 side effect of denying those users access to the shares as well?

From: John McNulty johnm...@gmail.com
Date: Mon, 20 Jun 2011 10:50:45 +0100

 The user accounts exist in Active Directory and we're using the rfc2307
 schema.  So the shell is set in AD.  I cannot change the shell to /bin/false
 or that would affect all the other servers they login to.

I see. You may manage local login with the facility of PAM, for
example pam_access, pam_listfile or others...

---
TAKAHASHI Motonobu mo...@monyo.com / @damemonyo
  http://damedame.monyo.com/ / http://facebook.com/monyot
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba process throttled back?

2011-06-20 Thread Jeremy Allison
On Fri, Jun 17, 2011 at 09:39:16AM -0400, Lang, Rich wrote:
 Hello,
 
 We are running Samba 3.0.33 on a 2-node Linux cluster running RedHat 5.6 ES.  
 Its primary application is to serve out a single network drive to support our 
 business (out 350GB in size).  For several years, this solution has been 
 running flawlessly.  File access was almost as fast as a local disk, so 
 putting files on the server was never a problem.  Our clients are running 
 mostly Windows XP Pro.  We have a few Windows 7 clients.
 
 Almost a year ago, that changed.  Applications written in VB 6.0 that read 
 files from the server started showing *significant* performance problems.  
 What used to take seconds now takes more than a minute to finish.  Moving the 
 file to a local disk brought the speed back up to where it should be.  Moving 
 the file to a Windows 2003 or 2008 server also provided good throughput.  All 
 clients experience this same problem.
 
 I ran strace -f against the smbd process that is assigned to my desktop and 
 then ran the VB application to see what the daemon was up to.  I discovered 
 that it went through a process of opening the file several times and reading 
 data from it, using progressively smaller buffer sizes until is settled on 
 using a buffer size of 1, which it used for the remainder of the file I/O 
 session.

This *seems* like clients not using oplocks, when previously
they were. Has anything changed in the server system that might
be denying oplock requests ?

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


Re: [Samba] Samba process throttled back?

2011-06-20 Thread Lang, Rich
The clients may have undergone a change (Windows is always being patched), but 
the configuration of the server was not changed regarding oplocks.  No requests 
are being denied, since that situation would show up in the log file.



-Original Message-
From: Jeremy Allison [mailto:j...@samba.org]
Sent: Monday, June 20, 2011 3:49 PM
To: Lang, Rich
Cc: samba@lists.samba.org
Subject: Re: [Samba] Samba process throttled back?



On Fri, Jun 17, 2011 at 09:39:16AM -0400, Lang, Rich wrote:

 Hello,



 We are running Samba 3.0.33 on a 2-node Linux cluster running RedHat 5.6 ES.  
 Its primary application is to serve out a single network drive to support our 
 business (out 350GB in size).  For several years, this solution has been 
 running flawlessly.  File access was almost as fast as a local disk, so 
 putting files on the server was never a problem.  Our clients are running 
 mostly Windows XP Pro.  We have a few Windows 7 clients.



 Almost a year ago, that changed.  Applications written in VB 6.0 that read 
 files from the server started showing *significant* performance problems.  
 What used to take seconds now takes more than a minute to finish.  Moving the 
 file to a local disk brought the speed back up to where it should be.  Moving 
 the file to a Windows 2003 or 2008 server also provided good throughput.  All 
 clients experience this same problem.



 I ran strace -f against the smbd process that is assigned to my desktop and 
 then ran the VB application to see what the daemon was up to.  I discovered 
 that it went through a process of opening the file several times and reading 
 data from it, using progressively smaller buffer sizes until is settled on 
 using a buffer size of 1, which it used for the remainder of the file I/O 
 session.



This *seems* like clients not using oplocks, when previously they were. Has 
anything changed in the server system that might be denying oplock requests ?



Jeremy.

Richard G. Lang
Sr. Software Engineer
la...@specsensors.commailto:la...@specsensors.com
(330) 659-3312

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


Re: [Samba] Samba process throttled back?

2011-06-20 Thread Lang, Rich
Lang, Rich wrote:
 Hello,

 We are running Samba 3.0.33 on a 2-node Linux cluster running RedHat 5.6 ES.  
 Its primary application is to serve out a single network drive to support our 
 business (out 350GB in size).  For several years, this solution has been 
 running flawlessly.  File access was almost as fast as a local disk, so 
 putting files on the server was never a problem.  Our clients are running 
 mostly Windows XP Pro.  We have a few Windows 7 clients.

Any difference in performance between the client types?

None whatsoever.

Did the problems coincide with adding win7 machines to the network?

Nope.  Windows 7 didn't appear on the network until 8 months later.

Any new software on the clients (antivirus, firewall...etc?)  Is something 
using up more memory on them?

No - we can rule out the clients, since this happens on every client we have, 
no matter how it is configured.

on your sockets, I up the SO_RCVBUF and SO_SNDBUF to at least 65536 each 
(more won't help until full smb2 support is in samba)

I can make this change and see what happens.

Did you get any new windows servers on your network around the time of the 
problem?  I notice that you have your 'os level = 0', that means for things 
like name resolution, your smb server will have lowest
  priority -- even below a win98 client, as I understand it.

No new servers were added.  Our os level is low because the configuration file 
is for a BDC and only the PDC and BDC are part of this Samba-only domain - no 
Windows servers are a part of it.

You mention you ran an 'strace -f' on smbd.   Have you looked at a
wireshark trace?  That would tell you more -- like when negotiating a TCP 
session, if your windows client keeps reducing the RCV buffer size that would 
have told you why the reads were getting smaller.  Maybe you are getting packet 
drops, or similar

Good idea.  I would expect to see indications of this activity over the wire.  
I'll let you know ...

n   Reminds me,  do you have switches or hubs, what type of ethernet 
speed...I take it nothing in the hardward on the clients or the server has 
changed?

We run on all switches - Linksys and Dell.  We have 100MBPS to each desktop.

You say you are using RH.  Has the SW remained static since installation 
and through this problem increase (I.e. an auto-update of SW might have changed 
some setting in the kernel, or some firewall might have been added, 
modifiedetc...)...

This is a real possibility, although we've booted the servers up using a kernel 
image prior to the problem appearing and the problem remained.  Maybe I need to 
go back to a kernel module rev prior to the problem.

Are the windows client's 'paging' more?   I.e. was there any change
in the VB script or the SW it's using such that now there could be a memory 
leak, thus increased paging?

No - nothing like that is happening on the client.

Have you set/optimized your TCP/IP params on XP? (and what little
you can do on Win7...  which is less configurable than XP)   Have
you added more clients (significant?)...

These are pretty stock XP systems.  The problem was so sudden (worked great for 
years, then slowed to a crawl) that it has to be associated with a change on 
the server or the client.

On the Win clients...what SP are the XP clients running at?   Many
people complained when SP2 came out -- especially affected were network
applications.   SP3 has the best performance of the XP series (even
better than the original), while SP1 was slower than 'SP0' (original), and SP2 
was slower still...

We're all running at Windows XP service pack 3.

I don't have any specific theories...just asking for more data at this 
point, since there are so many possible variables...and just having the 
information out there would help anyone investigate the problem...



Good luck!
Linda


Thanks.


Richard G. Lang
Sr. Software Engineer
la...@specsensors.commailto:la...@specsensors.com
(330) 659-3312

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


[Samba] ubuntu, ocfs2 with cman and ctdb

2011-06-20 Thread charles
hi guys,

we're evaluating the available clustering options to get ctdb up and running
for a highly available file server.
we've set up both gluster and ocfs2 both on seperate 2 node setups.
ocfs2 seems to provide better throughput and iops to samba clients than does
gluster and that is comparing a single node server to a ctdb clustered 2
node server.
problem with ocfs2 is that i've been unable to configure it to utilize
cman's stack  to provide proper locking for ctdb. gfs2 is up next.

does anyone have any pointers/tutorials/document for getting ocfs2 set up
with cman on ubunutu?

thanks.

-- 
Charles
Belmopan, Belize

*clubmotorsports.bz* http://clubmotorsports.bz/
 *
*
*club motorsports belize
facebookhttp://www.facebook.com/pages/Club-Motorsports/135687249774906
*
*
*
*http://www.cardomain.com/ride/2400106*

... we just love cars and we love driving them!
... Do things like double clutch automatics, traction control, and lane
departure warnings really make cars better? I suppose by some metrics they
do. But for these amenities we trade character; for luxury we surrender
sensory experience; for comfort, we give up romance.

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


[Samba] Confusing Samba Issue After Move to New Subnet

2011-06-20 Thread Jon Forrest

I'm running Samba 3.0.33-3.29.el5_5 on a CentOS 5.5 machine.
I'm connecting to it from a Windows 7 SP1 machine. I'm using
security = user and passdb backend = tdbsam . Everything
works fine until I move the Windows machine to an IP address
on another subnet. All networking functions still work fine
on the new subnet except Samba so it's clear there is no
TCP/IP problem.

On the old subnet when I map the network drive I'm asked
for a password. I give a password which is accepted and then
I see a folder from the network share. I can open any file.
When I'm on the new subnet I'm *not* asked for a password
even though I give the '/user' option on the net use command
line. Then I see the folder from the network share but
I can't open any files or directories. It's as if I'm being
seen as a different user that doesn't have file level permissions.
I've turned off firewalls on both the Linux and the Windows
machine but this didn't make any difference.

What's also strange about this is that when I try connecting
to the Samba share from yet another Windows 7 computer on yet
another subnet, after adding it to the hosts allow section,
then everything works fine.

Does anybody have any idea what I'm doing wrong?

Cordially,
--
Jon Forrest
Research Computing Support
College of Chemistry
173 Tan Hall
University of California Berkeley
Berkeley, CA
94720-1460
510-643-1032
jlforr...@berkeley.edu

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


Re: [Samba] How do i get file attributes using samba.

2011-06-20 Thread Jeremy Allison
On Mon, Jun 20, 2011 at 12:58:07AM -0700, naga_kishore_komm...@yahoo.com wrote:
 Hi,
 I need to extract the following attributes of a file in Windows share using 
 samba.
 
 /* FileAttributesField */
 #define FILE_ATTRIBUTE_READONLY 0x001L
 #define FILE_ATTRIBUTE_HIDDEN   0x002L
 #define FILE_ATTRIBUTE_SYSTEM   0x004L
 #define FILE_ATTRIBUTE_DIRECTORY    0x010L
 #define FILE_ATTRIBUTE_ARCHIVE  0x020L
 #define FILE_ATTRIBUTE_NORMAL   0x080L
 #define FILE_ATTRIBUTE_TEMPORARY    0x100L
 #define FILE_ATTRIBUTE_SPARSE   0x200L
 #define FILE_ATTRIBUTE_REPARSE_POINT    0x400L
 #define FILE_ATTRIBUTE_COMPRESSED   0x800L
 #define FILE_ATTRIBUTE_OFFLINE  0x1000L
 #define FILE_ATTRIBUTE_NONINDEXED   0x2000L
 #define FILE_ATTRIBUTE_ENCRYPTED    0x4000L
 #define SAMBA_ATTRIBUTES_MASK   0x7F
 
 
 Which API of samba library should I use to extract these attributes of a file.

If you're using libsmbclient, you need to use
SMBC_getxattr() or SMBC_getxattr_ctx() asking
for system.dos_attr.mode.

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


[Samba] Problem getting Samba fully working

2011-06-20 Thread Moe, John
Hello all,

Relevant info up front: Gentoo PC, using 2.6.38 kernel and Samba 3.4.12.

I'm trying to get a FreeRadius instance working for our Windows network.
To do so, I need a Linux box running Samba.  I've installed and
configured Kerberos, Samba and FreeRadius, and can get most things to
work.  I can get a Kerberos key using kinit, and sudo net ads keytab
list shows me tickets.  I can use things like net ads user myuser -U
myuser to get info about my user account.  I can use sudo wbinfo -t
to show the secret trust is OK, and sudo net ads testjoin works as
well.  I can even log on to my switch using RADIUS authentication to my
AD account (using ntlm_auth).  So a lot of the pieces are working
correctly.

However, I cannot seem to be able to ssh into the box with a Windows
account.  The error I get is in log.wb-MYDOMAIN:

[2011/06/21 07:07:29,  1]
rpc_client/cli_pipe.c:949(cli_pipe_validate_current_pdu)
  cli_pipe_validate_current_pdu: RPC fault code
DCERPC_FAULT_ACCESS_DENIED received from host MYGC.my.domain.name!
[2011/06/21 07:07:31,  1]
rpc_client/cli_pipe.c:949(cli_pipe_validate_current_pdu)
  cli_pipe_validate_current_pdu: RPC fault code
DCERPC_FAULT_ACCESS_DENIED received from host MYGC.my.domain.name!
[2011/06/21 07:10:01,  1]
rpc_client/cli_pipe.c:949(cli_pipe_validate_current_pdu)
  cli_pipe_validate_current_pdu: RPC fault code
DCERPC_FAULT_ACCESS_DENIED received from host MYGC.my.domain.name!
[2011/06/21 07:12:21,  1]
rpc_client/cli_pipe.c:949(cli_pipe_validate_current_pdu)
  cli_pipe_validate_current_pdu: RPC fault code
DCERPC_FAULT_ACCESS_DENIED received from host MYGC.my.domain.name!

These occur not only when I try to log on via SSH, but also when no-one
is trying to log in, i.e., the system is doing it.

Also, on my GC that is configured as the password server in smb.conf
(and the admin_server and the kdc in krb5.conf), I keep getting errors
that say:

Logon attempt by: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
 Logon account:
 Source Workstation:
 Error Code: 0xC064

And yes, the middle two fields are empty.  The reason I know it's my
server is because these fill the log with up to 20 or so per second, and
as soon as I turn off the server, it stops.

I need to get SSH via Samba auth working so that our network admins can
log on to the box using a non-local account and do management if needed.

Can anyone suggest where to start looking?  Any help would be
appreciated.  Thanks.

John H. Moe
Network Support - Hatch IT
HATCH
Tel: +61 (7) 3166 
Direct: +61 (7) 3166 7684
Fax: +61 (7) 3368 3754
Mobile: +61 438 772 425
61 Petrie Terrace, Brisbane, Queensland Australia 4011
*
NOTICE - This message from Hatch is intended only for the use of the individual 
or entity to which it is addressed and may contain information which is 
privileged, confidential or proprietary. 
Internet communications cannot be guaranteed to be secure or error-free as 
information could be intercepted, corrupted, lost, arrive late or contain 
viruses. By communicating with us via e-mail, you accept such risks.  When 
addressed to our clients, any information, drawings, opinions or advice 
(collectively, information) contained in this e-mail is subject to the terms 
and conditions expressed in the governing agreements.  Where no such agreement 
exists, the recipient shall neither rely upon nor disclose to others, such 
information without our written consent.  Unless otherwise agreed, we do not 
assume any liability with respect to the accuracy or completeness of the 
information set out in this e-mail.  If you have received this message in 
error, please notify us immediately by return e-mail and destroy and delete the 
message from your computer.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] ubuntu, ocfs2 with cman and ctdb

2011-06-20 Thread Jeremy Allison
On Mon, Jun 20, 2011 at 03:18:02PM -0600, charles wrote:
 hi guys,
 
 we're evaluating the available clustering options to get ctdb up and running
 for a highly available file server.
 we've set up both gluster and ocfs2 both on seperate 2 node setups.
 ocfs2 seems to provide better throughput and iops to samba clients than does
 gluster and that is comparing a single node server to a ctdb clustered 2
 node server.
 problem with ocfs2 is that i've been unable to configure it to utilize
 cman's stack  to provide proper locking for ctdb. gfs2 is up next.
 
 does anyone have any pointers/tutorials/document for getting ocfs2 set up
 with cman on ubunutu?

Jim Mcdonough and his team @ SuSE has done most of the work
looking at Samba/CTDB with ocfs2.

Jim, any comments ?

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


Re: [Samba] How do i get file attributes using samba.

2011-06-20 Thread naga_kishore_kommuri
Hi,

I tried smbc_getxattr() with system.dos_attr.mode
and I guess it will give me following attributes only...

#define SMBC_DOS_MODE_READONLY   0x01
#define SMBC_DOS_MODE_HIDDEN 0x02
#define SMBC_DOS_MODE_SYSTEM 0x04
#define SMBC_DOS_MODE_VOLUME_ID  0x08
#define SMBC_DOS_MODE_DIRECTORY  0x10
#define SMBC_DOS_MODE_ARCHIVE    0x20


How can I get other attributes?

thanks,
-Kishore




From: naga_kishore_komm...@yahoo.com naga_kishore_komm...@yahoo.com
To: samba@lists.samba.org samba@lists.samba.org
Sent: Monday, June 20, 2011 1:28 PM
Subject: [Samba] How do i get file attributes using samba.

Hi,
I need to extract the following attributes of a file in Windows share using 
samba.

/* FileAttributesField */
#define FILE_ATTRIBUTE_READONLY 0x001L
#define FILE_ATTRIBUTE_HIDDEN   0x002L
#define FILE_ATTRIBUTE_SYSTEM   0x004L
#define FILE_ATTRIBUTE_DIRECTORY    0x010L
#define FILE_ATTRIBUTE_ARCHIVE  0x020L
#define FILE_ATTRIBUTE_NORMAL   0x080L
#define FILE_ATTRIBUTE_TEMPORARY    0x100L
#define FILE_ATTRIBUTE_SPARSE   0x200L
#define FILE_ATTRIBUTE_REPARSE_POINT    0x400L
#define FILE_ATTRIBUTE_COMPRESSED   0x800L
#define FILE_ATTRIBUTE_OFFLINE  0x1000L
#define FILE_ATTRIBUTE_NONINDEXED   0x2000L
#define FILE_ATTRIBUTE_ENCRYPTED    0x4000L
#define SAMBA_ATTRIBUTES_MASK   0x7F


Which API of samba library should I use to extract these attributes of a file.

Thanks 

-Kishore
-- 
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

2011-06-20 Thread Andrew Bartlett
The branch, master has been updated
   via  a1f04e8 libcli/util Rename common map_nt_error_from_unix to avoid 
duplicate symbol
   via  018f4a5 libcli/util Bring samba4 unix - nt_status code in common.
   via  a63189e s3-libcli Remove unused error mapping tables
   via  ee90e01 s3-winbind Move winbind privileged socket dir into 
state_path()
   via  6c9a780 build: Put lockdir and cachedir in FHS-like locations by 
default
   via  edd3e8b s4-build Change default paths and --with flags for a 4.0 
release
  from  01ce078 s4-upgradeprovision: propose the use of findprovisionranges 
if no ranges are present

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


- Log -
commit a1f04e8abc761ef1ba211420ff1dbda50fcf527d
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jun 20 14:55:32 2011 +1000

libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol

The two error tables need to be combined, but for now seperate the names.

(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).

Andrew Bartlett

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104

commit 018f4a5889743f742a59e9ad72056b2ea09adfe9
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jun 20 14:03:26 2011 +1000

libcli/util Bring samba4 unix - nt_status code in common.

Due to library link orders, this is already the function that is being
used.  However we still need to sort out the duplicate symbol issues,
probably by renaming things.

Andrew Bartlett

commit a63189e9f03fb84206a0c8460c5325815a31d62a
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jun 20 13:24:38 2011 +1000

s3-libcli Remove unused error mapping tables

The functions which uesed these tables have since moved in common.

Andrew Bartlett

commit ee90e0103094cd0289c42cc1f25fe4960b3c436b
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jun 20 10:13:09 2011 +1000

s3-winbind Move winbind privileged socket dir into state_path()

On default installs, this will be the same as the old lock_path(), but
lock_path() is now a directory that can safely be mapped to /var/locks
and removed by the OS on reboot.  It is important that the directory
permissions of this directory be preserved, as they may be customised.

Andrew Bartlett

commit 6c9a78074a429773cefd1a3c798b7e3ad7d4c325
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 15 14:40:51 2011 +1000

build: Put lockdir and cachedir in FHS-like locations by default

This does not move statedir, leaving it in PREFIX/var/locks because
state files such as idmap are dangerous to move, as they might
re-create, causing chaos.

This isn't ideal, but I don't have a better solution right now.

Andrew Bartlett

commit edd3e8b03aa0bca85d4a9a62b35471e76a1f9390
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Jun 14 17:01:02 2011 +1000

s4-build Change default paths and --with flags for a 4.0 release

The following changes are made since Samba 3.6:

* --with-ncalrpcdir and --with-nmbdsocketdir are replaced with 
--with-socket-dir
  (with ntp_signd, winbindd, nmbd subdirs)

* This moves the winbind socket out of /tmp.  Distributions have moved
  this out of /tmp for quite some time now, and /var/run in the FHS
  blessed location these days.  --with-socketdir should point to
  /var/run in a distribution package.

* Configuration files are expected in PREFIX/etc instead of PREFIX/lib
  (they need to be moved manually)

* SWAT data files have moved to PREFIX/share/swat (alongside
  PREFIX/share/setup containing samba4 provision templates).

* The --with-fhs option is no longer available (it was never very
  useful, and major distributions (Debian, OpenSuSE, Fedora) either
  specified every option (overriding the effect) or didn't specify it
  at all.

* PID files are now in PREFIX/var/run, moved from PREFIX/var/locks

* The ncalrpc and nmbd sockets are now in PREFIX/var/run by default

The following changes are made for users of Samba3 binaries built with the 
top level build in master

* 'state' files are now expected to be in their Samba 3.6 location
  PREFIX/var/locks (and will need to be moved manually)

Andrew Bartlett

Signed-off-by: Andrew Tridgell tri...@samba.org

---

Summary of changes:
 lib/torture/torture.c |4 +-
 libcli/auth/msrpc_parse.c |6 +-
 libcli/auth/wscript_build |2 +-
 libcli/cldap/cldap.c  |8 +-
 

autobuild: intermittent test failure detected

2011-06-20 Thread autobuild
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-06-20-0825/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-06-20-0825/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-06-20-0825/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-06-20-0825/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-06-20-0825/samba4.stdout
  
The top commit at the time of the failure was:

commit 01ce078ed166635c29e89bd012c82e3612393f28
Author: Matthieu Patou m...@matws.net
Date:   Mon Jun 20 01:05:04 2011 +0400

s4-upgradeprovision: propose the use of findprovisionranges if no ranges 
are present

Autobuild-User: Matthieu Patou m...@samba.org
Autobuild-Date: Mon Jun 20 00:30:59 CEST 2011 on sn-devel-104


[SCM] Samba Shared Repository - branch master updated

2011-06-20 Thread Matthieu Patou
The branch, master has been updated
   via  29e043a pyldb: add unit test for get(myattribute, defVal)
  from  a1f04e8 libcli/util Rename common map_nt_error_from_unix to avoid 
duplicate symbol

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


- Log -
commit 29e043a2080143ea8ed19e5aa7880690b4ec4644
Author: Matthieu Patou m...@matws.net
Date:   Sat Jun 11 18:09:40 2011 +0400

pyldb: add unit test for get(myattribute, defVal)

Autobuild-User: Matthieu Patou m...@samba.org
Autobuild-Date: Mon Jun 20 09:23:15 CEST 2011 on sn-devel-104

---

Summary of changes:
 source4/lib/ldb/tests/python/api.py |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/tests/python/api.py 
b/source4/lib/ldb/tests/python/api.py
index a9f68cb..e7658d5 100755
--- a/source4/lib/ldb/tests/python/api.py
+++ b/source4/lib/ldb/tests/python/api.py
@@ -516,6 +516,11 @@ class LdbMsgTests(unittest.TestCase):
 self.msg[foo] = [bar]
 self.assertEquals(bar, self.msg.get(foo)[0])
 
+def test_get_default(self):
+self.assertEquals(None, self.msg.get(tatayoyo))
+
+self.assertEquals(anniecordie, self.msg.get(tatayoyo, 
anniecordie))
+
 def test_get_unknown(self):
 self.assertEquals(None, self.msg.get(lalalala))
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-06-20 Thread Volker Lendecke
The branch, master has been updated
   via  a8c3d38 s3: Replace shadow_copy2 with a new implementation
  from  29e043a pyldb: add unit test for get(myattribute, defVal)

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


- Log -
commit a8c3d38bc806c6972d10b6a371de8941da25a9ae
Author: Volker Lendecke v...@samba.org
Date:   Mon Jun 20 09:52:21 2011 +0200

s3: Replace shadow_copy2 with a new implementation

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Mon Jun 20 11:17:47 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/modules/vfs_shadow_copy2.c | 1803 
 1 files changed, 1205 insertions(+), 598 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_shadow_copy2.c 
b/source3/modules/vfs_shadow_copy2.c
index 25cc5d4..1ed828b 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -1,32 +1,29 @@
-/* 
- * implementation of an Shadow Copy module - version 2
+/*
+ * Third attempt at a shadow copy module
  *
- * Copyright (C) Andrew Tridgell 2007
- * Copyright (C) Ed Plese2009
+ * Copyright (C) Andrew Tridgell   2007 (portions taken from shadow_copy2)
+ * Copyright (C) Ed Plese  2009
+ * Copyright (C) Volker Lendecke   2011
+ * Copyright (C) Christian Ambach  2011
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- *  
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *  
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include includes.h
-#include smbd/smbd.h
-#include system/filesys.h
-#include ntioctl.h
-
 /*
 
-  This is a 2nd implemetation of a shadow copy module for exposing
+  This is a 3rd implemetation of a shadow copy module for exposing
   snapshots to windows clients as shadow copies. This version has the
   following features:
 
@@ -96,243 +93,169 @@
   The following command would generate a correctly formatted directory name
   for use with the default parameters:
  date -u +@GMT-%Y.%m.%d-%H.%M.%S
-  
  */
 
-static int vfs_shadow_copy2_debug_level = DBGC_VFS;
-
-#undef DBGC_CLASS
-#define DBGC_CLASS vfs_shadow_copy2_debug_level
+#include includes.h
+#include system/filesys.h
+#include include/ntioctl.h
+#include smbd/proto.h
+#include tdb.h
+#include util_tdb.h
 
 #define GMT_NAME_LEN 24 /* length of a @GMT- name */
-#define SHADOW_COPY2_GMT_FORMAT @GMT-%Y.%m.%d-%H.%M.%S
+#define GMT_FORMAT @GMT-%Y.%m.%d-%H.%M.%S
 
-#define SHADOW_COPY2_DEFAULT_SORT NULL
-#define SHADOW_COPY2_DEFAULT_FORMAT @GMT-%Y.%m.%d-%H.%M.%S
-#define SHADOW_COPY2_DEFAULT_LOCALTIME false
-
-/*
-  make very sure it is one of our special names 
- */
-static inline bool shadow_copy2_match_name(const char *name, const char 
**gmt_start)
+static bool shadow_copy2_find_slashes(TALLOC_CTX *mem_ctx, const char *str,
+ size_t **poffsets,
+ unsigned *pnum_offsets)
 {
-   unsigned year, month, day, hr, min, sec;
+   unsigned num_offsets;
+   size_t *offsets;
const char *p;
-   if (gmt_start) {
-   (*gmt_start) = NULL;
-   }
-   p = strstr_m(name, @GMT-);
-   if (p == NULL) return false;
-   if (p  name  p[-1] != '/') return False;
-   if (sscanf(p, @GMT-%04u.%02u.%02u-%02u.%02u.%02u, year, month,
-  day, hr, min, sec) != 6) {
-   return False;
-   }
-   if (p[24] != 0  p[24] != '/') {
-   return False;
-   }
-   if (gmt_start) {
-   (*gmt_start) = p;
-   }
-   return True;
-}
 
-static char *shadow_copy2_snapshot_to_gmt(TALLOC_CTX *mem_ctx,
-   vfs_handle_struct *handle, const char *name)
-{
-   struct tm timestamp;
-   time_t timestamp_t;
-   char gmt[GMT_NAME_LEN + 1];
-   const char *fmt;
+   num_offsets = 0;
 
-   fmt = lp_parm_const_string(SNUM(handle-conn), shadow,
-  format, SHADOW_COPY2_DEFAULT_FORMAT);
+   p = str;
+   while ((p = strchr(p, '/')) != NULL) {
+   num_offsets += 1;
+   p += 1;
+   }
 
-   ZERO_STRUCT(timestamp);
-   if (strptime(name, fmt, timestamp) == NULL) {
-   DEBUG(10, 

[SCM] Samba Shared Repository - branch master updated

2011-06-20 Thread Volker Lendecke
The branch, master has been updated
   via  dc461ca s3: Fix the build, NAME_MAX not universally available
   via  f0ff6f3 Use tevent_req_oom
   via  8e1b964 tevent: change version to 0.9.12
   via  c2a826b tevent: Add tevent_req_oom
  from  580fedc tdb_compat: respect TDB_NO_FSYNC environment variable for 
tdb2.

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


- Log -
commit dc461cade5becec21f8d1f2bb74fcf1a977a5ec2
Author: Volker Lendecke v...@samba.org
Date:   Mon Jun 20 12:09:06 2011 +0200

s3: Fix the build, NAME_MAX not universally available

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Mon Jun 20 13:45:21 CEST 2011 on sn-devel-104

commit f0ff6f390a14b0da8466096c0886f5c4860b977f
Author: Volker Lendecke v...@samba.org
Date:   Sun Jun 19 21:10:01 2011 +0200

Use tevent_req_oom

This fixes a few Coverity errors

commit 8e1b9640e73bf08b161f6e9a3d86ec71708098a4
Author: Volker Lendecke v...@samba.org
Date:   Mon Jun 20 11:43:51 2011 +0200

tevent: change version to 0.9.12

commit c2a826b10c403e1b4d7e6da1b41c89ed01d07f40
Author: Volker Lendecke v...@samba.org
Date:   Sun Jun 19 20:55:46 2011 +0200

tevent: Add tevent_req_oom

This is a replacement for tevent_req_nomem(NULL, req)

---

Summary of changes:
 .../ABI/{tevent-0.9.10.sigs = tevent-0.9.12.sigs} |1 +
 lib/tevent/tevent.h|   14 ++
 lib/tevent/tevent_req.c|7 ++-
 lib/tevent/wscript |2 +-
 lib/tsocket/tsocket_helpers.c  |6 +++---
 libcli/cldap/cldap.c   |4 ++--
 source3/lib/fncall.c   |2 +-
 source3/lib/tldap.c|4 ++--
 source3/libsmb/async_smb.c |2 +-
 source3/libsmb/cliconnect.c|2 +-
 source3/libsmb/namequery.c |8 
 source3/modules/vfs_shadow_copy2.c |2 +-
 source3/torture/wbc_async.c|2 +-
 source3/winbindd/wb_lookupsids.c   |6 +++---
 source3/winbindd/winbindd_dual.c   |2 +-
 source3/winbindd/winbindd_dual_ndr.c   |2 +-
 source4/kdc/proxy.c|2 +-
 source4/ldap_server/ldap_server.c  |2 +-
 source4/lib/messaging/messaging.c  |2 +-
 source4/libcli/wrepl/winsrepl.c|4 ++--
 20 files changed, 48 insertions(+), 28 deletions(-)
 copy lib/tevent/ABI/{tevent-0.9.10.sigs = tevent-0.9.12.sigs} (98%)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/ABI/tevent-0.9.10.sigs 
b/lib/tevent/ABI/tevent-0.9.12.sigs
similarity index 98%
copy from lib/tevent/ABI/tevent-0.9.10.sigs
copy to lib/tevent/ABI/tevent-0.9.12.sigs
index 9adaba5..df9b08d 100644
--- a/lib/tevent/ABI/tevent-0.9.10.sigs
+++ b/lib/tevent/ABI/tevent-0.9.12.sigs
@@ -14,6 +14,7 @@ _tevent_req_done: void (struct tevent_req *, const char *)
 _tevent_req_error: bool (struct tevent_req *, uint64_t, const char *)
 _tevent_req_nomem: bool (const void *, struct tevent_req *, const char *)
 _tevent_req_notify_callback: void (struct tevent_req *, const char *)
+_tevent_req_oom: void (struct tevent_req *, const char *)
 _tevent_schedule_immediate: void (struct tevent_immediate *, struct 
tevent_context *, tevent_immediate_handler_t, void *, const char *, const char 
*)
 tevent_backend_list: const char **(TALLOC_CTX *)
 tevent_cleanup_pending_signal_handlers: void (struct tevent_signal *)
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 38a4a9c..8204a28 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -995,6 +995,20 @@ bool _tevent_req_nomem(const void *p,
_tevent_req_nomem(p, req, __location__)
 #endif
 
+#ifdef DOXYGEN
+/**
+ * @brief Indicate out of memory to a request
+ *
+ * @param[in]  req  The request being processed.
+ */
+void tevent_req_oom(struct tevent_req *req);
+#else
+void _tevent_req_oom(struct tevent_req *req,
+const char *location);
+#define tevent_req_oom(req) \
+   _tevent_req_oom(req, __location__)
+#endif
+
 /**
  * @brief Finish a request before the caller had the change to set the 
callback.
  *
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index b0c9c57..92697b7 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -123,6 +123,11 @@ bool _tevent_req_error(struct tevent_req *req,
return true;
 }
 
+void _tevent_req_oom(struct tevent_req *req, const char *location)
+{
+   tevent_req_finish(req, TEVENT_REQ_NO_MEMORY, location);
+}
+
 bool _tevent_req_nomem(const void *p,
   struct tevent_req *req,
  

[SCM] Samba Shared Repository - branch master updated

2011-06-20 Thread Michael Adam
The branch, master has been updated
   via  c8cfd75 s3:idmap_autorid: remove redundant code
   via  d278eba s3:idmap_autorid: in initialize, don't leak storedconfig to 
talloc_tos() in the success case
   via  389eada s3:idmap_autorid: use idmap config * : rangesize instead 
of autorid : rangesize
   via  0f76273 s3:idmap_autorid: fail initialization if the domain is not 
*
  from  dc461ca s3: Fix the build, NAME_MAX not universally available

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


- Log -
commit c8cfd756746b23165365acfe25909aab3a26ab8e
Author: Michael Adam ob...@samba.org
Date:   Fri Jun 10 00:50:42 2011 +0200

s3:idmap_autorid: remove redundant code

Autobuild-User: Michael Adam ob...@samba.org
Autobuild-Date: Mon Jun 20 14:56:29 CEST 2011 on sn-devel-104

commit d278eba7841bd8aaefc1970ea08e6aa4e4914ef0
Author: Michael Adam ob...@samba.org
Date:   Fri Jun 10 00:49:37 2011 +0200

s3:idmap_autorid: in initialize, don't leak storedconfig to talloc_tos() in 
the success case

commit 389eada12d3fb4b305d426baaeddf1a9ccfd781e
Author: Michael Adam ob...@samba.org
Date:   Fri Jun 10 00:46:19 2011 +0200

s3:idmap_autorid: use idmap config * : rangesize instead of autorid : 
rangesize

commit 0f762734230e85fbc08d4343181ed061f78e053b
Author: Michael Adam ob...@samba.org
Date:   Tue Jun 7 15:53:49 2011 +0200

s3:idmap_autorid: fail initialization if the domain is not *

autorid can only be used as a backend for the default idmap configuration.

---

Summary of changes:
 source3/winbindd/idmap_autorid.c |   19 ---
 1 files changed, 12 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c
index e9048d8..cddbff2 100644
--- a/source3/winbindd/idmap_autorid.c
+++ b/source3/winbindd/idmap_autorid.c
@@ -436,6 +436,13 @@ static NTSTATUS idmap_autorid_initialize(struct 
idmap_domain *dom)
NTSTATUS status;
uint32_t hwm;
 
+   if (!strequal(dom-name, *)) {
+   DEBUG(0, (idmap_autorid_initialize: Error: autorid configured 
+ for domain '%s'. But autorid can only be used for 
+ the default idmap configuration.\n, dom-name));
+   return NT_STATUS_INVALID_PARAMETER;
+   }
+
config = talloc_zero(dom, struct autorid_global_config);
if (!config) {
DEBUG(0, (Out of memory!\n));
@@ -448,7 +455,7 @@ static NTSTATUS idmap_autorid_initialize(struct 
idmap_domain *dom)
}
 
config-minvalue = dom-low_id;
-   config-rangesize = lp_parm_int(-1, autorid, rangesize, 10);
+   config-rangesize = lp_parm_int(-1, idmap config *, rangesize, 
10);
 
if (config-rangesize  2000) {
DEBUG(1, (autorid rangesize must be at least 2000\n));
@@ -523,14 +530,12 @@ static NTSTATUS idmap_autorid_initialize(struct 
idmap_domain *dom)
 
dom-private_data = config;
 
-   if (!NT_STATUS_IS_OK(status)) {
-   goto error;
-   }
+   goto done;
 
-   return NT_STATUS_OK;
-
-  error:
+error:
talloc_free(config);
+
+done:
talloc_free(storedconfig);
 
return status;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-06-20 Thread Volker Lendecke
The branch, master has been updated
   via  994abd2 s3: Fix a winbind message
  from  c8cfd75 s3:idmap_autorid: remove redundant code

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


- Log -
commit 994abd2dea2164bb005209b77ec2608b4a5fe4e8
Author: Volker Lendecke v...@samba.org
Date:   Mon Jun 20 22:18:48 2011 +0200

s3: Fix a winbind message

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Mon Jun 20 23:28:43 CEST 2011 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 1646821..8cd68e5 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -544,7 +544,7 @@ static struct winbindd_async_dispatch_table 
async_nonpriv_table[] = {
{ WINBINDD_PAM_CHNG_PSWD_AUTH_CRAP, PAM_CHNG_PSWD_AUTH_CRAP,
  winbindd_pam_chng_pswd_auth_crap_send,
  winbindd_pam_chng_pswd_auth_crap_recv },
-   { WINBINDD_WINS_BYIP, PING,
+   { WINBINDD_WINS_BYIP, WINS_BYIP,
  winbindd_wins_byip_send, winbindd_wins_byip_recv },
 
{ 0, NULL, NULL, NULL }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-06-20 Thread Andrew Bartlett
The branch, master has been updated
   via  233a622 s4-param Autogenerate the loadparm_globals and 
loadparm_service tables
   via  79b1a10 selftest: Run tests for libsmbclient and libnetapi
   via  a6f31f1 s4-torture Enable libnetapi and libsmbclient tests using 
combined build
   via  577034b build: disable -Wl,--as-needed to try and fix the build
   via  179a353 s4-cmdline: Rename popt tables to avoid symbol conflicts
   via  5db74b9 lib/util Remove samba-util-common!
   via  d18491a lib/util: allow parmlist.c to compile under s3 includes.h
   via  f83fca1 lib/util: Use common d_printf() in the whole codebase
   via  ea006ab s3-param Put Globals in the FN_ macros, rather than in 
each entry
   via  5db2041 s4-param Add my authorship to this script
   via  f3d6b74 lib/util Make unused d_vfprintf() static
  from  994abd2 s3: Fix a winbind message

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


- Log -
commit 233a6223b2ff84dcd965d0f295fbe88ba50ce5c5
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jun 20 15:48:12 2011 +1000

s4-param Autogenerate the loadparm_globals and loadparm_service tables

This makes it much easier and less error prone to add new parameters
as we merge the s3 and s4 loadparm systems.

Andrew Bartlett

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Tue Jun 21 04:41:54 CEST 2011 on sn-devel-104

commit 79b1a1092dbbb45bb8839c71e48479d1c6037b48
Author: Andrew Bartlett abart...@samba.org
Date:   Tue May 10 22:14:34 2011 +0200

selftest: Run tests for libsmbclient and libnetapi

This adds the known failure for the one test (netbios browsing) that
fails.

Andrew Bartlett

commit a6f31f13ec6c7eb65f2d3fc39038453bb14aa17b
Author: Andrew Bartlett abart...@samba.org
Date:   Tue May 10 22:12:52 2011 +0200

s4-torture Enable libnetapi and libsmbclient tests using combined build

Because we now always build the source3 code, we can link directly
against a private libnetapi and libsmbclient to test the behaviour of
these important APIs.

We use a private libnetapi_net_init(), and by using this interface
rather than the public one, we can ensure that the correct smb.conf is
loaded (as smbtorture4 is a Samba4 semantics binary).

The #include of the source3 includes.h is required to do the manual
lp_load().

Andrew Bartlett

commit 577034b3cd18c518140b91ade6b94487734ed92a
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jun 20 21:22:59 2011 +1000

build: disable -Wl,--as-needed to try and fix the build

The issue here is that the source3 components now built as part of the
top level build do not have their depenencies fully specified, and
this causes the build to fail for many of our users.

When we fix that, we can restore this flag, so we again find that kind
of bug, which will show up for our Gentoo users regardless.

Andrew Bartlett

commit 179a3530d7aace977c6847f165033d9c6b6adba8
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jun 20 20:57:41 2011 +1000

s4-cmdline: Rename popt tables to avoid symbol conflicts

These same names are use in the source3 popt code, which is called from
in libsmbclient and libnet.  These are then included in the smbtorture
binary for testing

Andrew Bartlett

commit 5db74b9607f4a5fc5ecaa8be0d744222cd55153c
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jun 20 20:36:46 2011 +1000

lib/util Remove samba-util-common!

All of this code is now in common, so we don't need the second
'-common' library any more!

Andrew Bartlett

commit d18491a7bdad69b8035eb7cda4d203cb792742f6
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jun 20 20:43:42 2011 +1000

lib/util: allow parmlist.c to compile under s3 includes.h

commit f83fca1c576e094e2a852cc466bd9110c05fe731
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jun 20 19:56:50 2011 +1000

lib/util: Use common d_printf() in the whole codebase

This removes the lang_tdb based varient, the only user of the lang_tdb
code is SWAT, which calls that directly.

'net' and 'pam_winbind' are internationalised using gettext.

Andrew Bartlett

commit ea006ab8b2cdcde0d808aa042e143da9d641753a
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jun 20 17:57:24 2011 +1000

s3-param Put Globals in the FN_ macros, rather than in each entry

This global replace allows an easier comparison between the source3
and source4 loadparm systems.

Andrew Bartlett

commit 5db2041511fa2921c709889c371b676e4647d4ba
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jun 20 15:51:18 2011 +1000

s4-param Add my authorship to this script

commit f3d6b742b18589306e0f19cc52e06f108fc1268e
Author: Andrew Bartlett 

[SCM] Samba Shared Repository - branch master updated

2011-06-20 Thread Rusty Russell
The branch, master has been updated
   via  894b027 lib/ccan/tally.h: update for FreeBSD compile.
  from  233a622 s4-param Autogenerate the loadparm_globals and 
loadparm_service tables

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


- Log -
commit 894b0273fcff28dfaef80ce7be1bcc35d47aed65
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Tue Jun 21 11:20:07 2011 +0930

lib/ccan/tally.h: update for FreeBSD compile.

Based on commit 0284423676209380a2e07086b9b356096a2f93e6 from CCAN:
Author: Rusty Russell ru...@rustcorp.com.au
Date:   Tue Jun 21 10:43:31 2011 +0930

tally: fix FreeBSD compile, memleak in tests.

Posix says ssize_t is in sys/types.h; on Linux stdlib.h is enough.

Autobuild-User: Rusty Russell ru...@rustcorp.com.au
Autobuild-Date: Tue Jun 21 05:52:12 CEST 2011 on sn-devel-104

---

Summary of changes:
 lib/ccan/tally/tally.c|2 +-
 lib/ccan/tally/tally.h|3 ++-
 lib/ccan/tally/test/run-mean.c|1 +
 lib/ccan/tally/test/run-median.c  |1 +
 lib/ccan/tally/test/run-min-max.c |1 +
 lib/ccan/tally/test/run-mode.c|1 +
 lib/ccan/tally/test/run-renormalize.c |1 +
 7 files changed, 8 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c
index 0d01907..b1839be 100644
--- a/lib/ccan/tally/tally.c
+++ b/lib/ccan/tally/tally.c
@@ -1,4 +1,3 @@
-#include config.h
 #include ccan/tally/tally.h
 #include ccan/build_assert/build_assert.h
 #include ccan/likely/likely.h
@@ -7,6 +6,7 @@
 #include string.h
 #include stdio.h
 #include assert.h
+#include stdlib.h
 
 #define SIZET_BITS (sizeof(size_t)*CHAR_BIT)
 
diff --git a/lib/ccan/tally/tally.h b/lib/ccan/tally/tally.h
index e715717..650e265 100644
--- a/lib/ccan/tally/tally.h
+++ b/lib/ccan/tally/tally.h
@@ -1,6 +1,7 @@
 #ifndef CCAN_TALLY_H
 #define CCAN_TALLY_H
-#include stdlib.h
+#include config.h
+#include sys/types.h
 
 struct tally;
 
diff --git a/lib/ccan/tally/test/run-mean.c b/lib/ccan/tally/test/run-mean.c
index a4a67cf..b43dea6 100644
--- a/lib/ccan/tally/test/run-mean.c
+++ b/lib/ccan/tally/test/run-mean.c
@@ -25,5 +25,6 @@ int main(void)
ok1(tally_mean(tally) == 0);
}
 
+   free(tally);
return exit_status();
 }
diff --git a/lib/ccan/tally/test/run-median.c b/lib/ccan/tally/test/run-median.c
index f461c2e..b12fd8a 100644
--- a/lib/ccan/tally/test/run-median.c
+++ b/lib/ccan/tally/test/run-median.c
@@ -40,6 +40,7 @@ int main(void)
ok1(median - (ssize_t)err = i/2
 median + (ssize_t)err = i/2);
}
+   free(tally);
 
return exit_status();
 }
diff --git a/lib/ccan/tally/test/run-min-max.c 
b/lib/ccan/tally/test/run-min-max.c
index ffb0f2e..c92f6d3 100644
--- a/lib/ccan/tally/test/run-min-max.c
+++ b/lib/ccan/tally/test/run-min-max.c
@@ -16,5 +16,6 @@ int main(void)
ok1(tally_max(tally) == i);
ok1(tally_min(tally) == -i);
}
+   free(tally);
return exit_status();
 }
diff --git a/lib/ccan/tally/test/run-mode.c b/lib/ccan/tally/test/run-mode.c
index 7216738..cd2f230 100644
--- a/lib/ccan/tally/test/run-mode.c
+++ b/lib/ccan/tally/test/run-mode.c
@@ -41,5 +41,6 @@ int main(void)
ok1(mode - (ssize_t)err = 0  mode + (ssize_t)err = 0);
}
 
+   free(tally);
return exit_status();
 }
diff --git a/lib/ccan/tally/test/run-renormalize.c 
b/lib/ccan/tally/test/run-renormalize.c
index 7c14152..8fe9dbc 100644
--- a/lib/ccan/tally/test/run-renormalize.c
+++ b/lib/ccan/tally/test/run-renormalize.c
@@ -21,5 +21,6 @@ int main(void)
ok1(tally-counts[0] == 2);
ok1(tally-counts[1] == 0);
 
+   free(tally);
return exit_status();
 }


-- 
Samba Shared Repository