Re: [Samba] Sysvol replication and group policies

2013-06-14 Thread Marc Muehlfeld

Hello Ulrich,


Am 12.06.2013 23:32, schrieb Ulrich Schneider:
 Has anyone a working rsync script in use for the replication of gpos
 between a samba and a win domain controller?

You can find some scripts on the internet or on old list postings:
http://lists.samba.org/archive/samba-technical/2012-October/087432.html


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


Re: [Samba] Problems adding domain policies in debian 7 with samba4.0.6

2013-06-14 Thread Marc Muehlfeld

Hello Ruben,

Am 13.06.2013 22:06, schrieb ruben.cervantes:

Hi once again my greetings I rewrite because I'm in the same situation
but this time in debian 7 using samba4.0.6. The account lockout policy
does not work, got help from some colleagues but nothing I fail to solve
the problem, I have recommended using Zentyal 3.0 but it's my favorite
distro is debian and do not feel right changing. This time I used a
Windows 7 client and I administered the directives from the GPO in W7, I
need help with this directive,



You won't be able to set this via GPO yet. It's the same situation, like 
I described here about password settings:

http://wiki.samba.org/index.php/Samba4/FAQ#Is_it_possible_to_set_user_specific_password_policies_in_Samba4_.28e._g._on_a_OU-base.29.3F


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


Re: [Samba] samba and server availability

2013-06-14 Thread Marc Muehlfeld

Hello Blake,

Am 12.06.2013 00:50, schrieb Blake Patton:

Greetings, I have a samba server working fine, it is on a stock debian
box, with 2 nics, one inside and one outside. The problem I have is that
when the outside interface goes down, (the internet connection is a
wireless connection and in inclement weather the connection is
unavailable for some time). nobody on the internal network is able to
even see the server let alone the shares. I am stumped on this one, any
ideas.


Should samba listen on the wireless interface, too? If not, you can 
restrict Samba to listen only on defined interfaces (interfaces = lo eth0).


When the WLAN disconnects, does its interface dissappears? I don't know 
what system/backend you are running, so this is maybe something, that 
confuses Samba.


Does anything interesting appears in the system log, when the WLAN goes 
down? And also in the Samba logs?


Please give some more information (versions, OS, does NetworkManager 
manages your NICs or something else, etc.), to make it easier to find 
the problem.



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


[Samba] Windows 7 access to Samba server: Strange performance/delay problems while opening share

2013-06-14 Thread Ralf
Hello list!

I have strange performance issue with an single Windows 7 client in a
simple network setup with one samba server, and various windows clients
(Win XP, Windows 7).

All clients can open shares with explorer, without any delay (the share
contents are listed directly).
But one client, a lenovo Windows 7 Laptop has strange problems opening
these same shares. The time from opening a share, until the share is
listed, varies betwenn (seldom) direct response, and in most cases
delays between 3 and 20 seconds, in seldom extrem cases 1-2 minutes.

Because this is the only Windows 7 client with this kind of problems, i
reinstalled the machine from scratch (with the lenovo version of windows
7 from the hidden partition), hoping this problem was caused by any kind
of windows weiredness (the windows 7 installation was one or two years old).

The only change was, there were no more delays in listing shares, longer
than 20 seconds, so the core problem still exists.

What possibilities do I have, to solve this problem?


My next step was, to capture the network traffic this client does, while
opening an specific share. I captured also the traffic caused by two
other windows 7 clients, which do not have any delay issues while
opening the same share. My knowledge about samba network packages is far
to low, to be able to find the problem.

In my desparation now, I joined this list, hoping there is anybody, who
can give me a hint to the right direction, to solve this problem.


Thanks,
Ralf

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


[Samba] The problem with setting up AD domain to Samba 4

2013-06-14 Thread Vladimir A Fomkin
Good day!
I set up a domain controller AD (PDC and BDC) by Samba 4 on Debian Wheezy.
I took a configuration from examples. After setting the PDC I configured a
second controller(BDC) and connected it to the domain. On PDC server has
created a network folder for portable user profiles and synchronized it to
the BDC through csync2 . My problem that the PDC and the BDC on the same
user names has different UID and users can not access their network profile
on the BDC.
Please help deal with the problem!
P.S. Sorry for my English!

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


[Samba] The problem with setting up AD domain to Samba 4

2013-06-14 Thread Vladimir A Fomkin
Good day!
I set up a domain controller AD (PDC and BDC) by Samba 4 on Debian Wheezy.
I took a configuration from examples. After setting the PDC I configured a
second controller(BDC) and connected it to the domain. On PDC server has
created a network folder for portable user profiles and synchronized it to
the BDC through csync2 . My problem that the PDC and the BDC on the same
user names has different UID and users can not access their network profile
on the BDC.
Please help deal with the problem!
P.S. Sorry for my English!


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


Re: [Samba] Windows 7 access to Samba server: Strange performance/delay problems while opening share

2013-06-14 Thread felix
 Hello list!

 I have strange performance issue with an single Windows 7 client in a
 simple network setup with one samba server, and various windows clients
 (Win XP, Windows 7).

 All clients can open shares with explorer, without any delay (the share
 contents are listed directly).
 But one client, a lenovo Windows 7 Laptop has strange problems opening
 these same shares. The time from opening a share, until the share is
 listed, varies betwenn (seldom) direct response, and in most cases
 delays between 3 and 20 seconds, in seldom extrem cases 1-2 minutes.

 Because this is the only Windows 7 client with this kind of problems, i
 reinstalled the machine from scratch (with the lenovo version of windows
 7 from the hidden partition), hoping this problem was caused by any kind
 of windows weiredness (the windows 7 installation was one or two years
 old).

 The only change was, there were no more delays in listing shares, longer
 than 20 seconds, so the core problem still exists.

 What possibilities do I have, to solve this problem?


 My next step was, to capture the network traffic this client does, while
 opening an specific share. I captured also the traffic caused by two
 other windows 7 clients, which do not have any delay issues while
 opening the same share. My knowledge about samba network packages is far
 to low, to be able to find the problem.

 In my desparation now, I joined this list, hoping there is anybody, who
 can give me a hint to the right direction, to solve this problem.



I had a similar issue and it happened to be that my laptop network card
didn't work well with my switch (I tested in several ports of that network
switch and with other computers there were no problems with these ports).
So I plugged this laptop to another switch in my network and then it
worked!

Best regards,
Felix.

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


Re: [Samba] The problem with setting up AD domain to Samba 4

2013-06-14 Thread Marc Muehlfeld

Hello Vladimir,

Am 14.06.2013 14:18, schrieb Vladimir A Fomkin:

On PDC server has
created a network folder for portable user profiles and synchronized it to
the BDC through csync2 . My problem that the PDC and the BDC on the same
user names has different UID and users can not access their network profile
on the BDC.


Do the users have uidNumbers in AD? Try
idmap_ldb:use rfc2307 = yes
in your smb.conf


Regards,
Marc

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


Re: [Samba] The problem with setting up AD domain to Samba 4

2013-06-14 Thread Vladimir A Fomkin
Hello Marc!
Thank you for response!
I added this string in smb.conf on PDC and BDC, but after sync BDC again do
not give access. I see UID for files created for one user via PDC - 322
and via BDC - 319


2013/6/14 Marc Muehlfeld sa...@marc-muehlfeld.de

 Hello Vladimir,

 Am 14.06.2013 14:18, schrieb Vladimir A Fomkin:

  On PDC server has
 created a network folder for portable user profiles and synchronized it to
 the BDC through csync2 . My problem that the PDC and the BDC on the same
 user names has different UID and users can not access their network
 profile
 on the BDC.


 Do the users have uidNumbers in AD? Try
 idmap_ldb:use rfc2307 = yes
 in your smb.conf


 Regards,
 Marc




-- 
С уважением,
Фомкин Владимир Андреевич
ICQ:220967838
Skype:vladimir.fomkin
http://vaf.net.ru
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

[Samba] Problems when saving AutoCAD files

2013-06-14 Thread Santiago Pestarini
Hi!
I was searching for info about this issue and found almost nothing.
So, let's go directly to the matters...

- Problem:
AutoCAD says You do not have permission to save to this location.
when trying to save the file in the samba share dir.
(This problem only occur with AutoCAD.)

- Scenary:
Running AutoCAD in a WinXP/Win7 PC, opening a DWG AutoCAD file from
samba share dir in Zentyal Linux server.

I have Samba 4.0.5 running in my Zentyal 3.0.21, both recently updated.

- smb.conf contents:
[global]
workgroup = ESTUDIO
realm = ESTUDIO.LAN
netbios name = zentyal
server string = Zentyal File Server
server role = dc
server role check:inhibit = yes
server services = s3fs, rpc, wrepl, ldap, cldap, kdc, drepl,
winbind, ntp_signd, kcc, dnsupdate
server signing = auto

interfaces = lo,eth0
bind interfaces only = yes

log level = 3
log file = /var/log/samba/samba.log

guest ok = yes
map to guest = bad user
guest account = nobody
auth methods = guest sam_ignoredomain


[profiles]
path = /home/samba/profiles
browseable = no
read only = no

[netlogon]
path = /opt/samba4/var/locks/sysvol/estudio.lan/scripts
browseable = no
read only = yes

[sysvol]
path = /opt/samba4/var/locks/sysvol
read only = no

[homes]
comment = Directorios de usuario
path = /home/%S
read only = no
browseable = no
create mask = 0611
directory mask = 0711
vfs objects = acl_xattr full_audit scannedonly recycle

# Shares
[expedientes]
comment = Expedientes
path = /home/samba/shares/expedientes
browseable = Yes
read only = No
force create mode = 0660
force directory mode = 0660
vfs objects = acl_xattr full_audit scannedonly recycle



Also read this where Autodesk wash their hands, blaming the server,
the client, the network, etc:
http://forums.autodesk.com/t5/Installation-Licensing/Unable-to-save-drawing/td-p/72075

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


Re: [Samba] The problem with setting up AD domain to Samba 4

2013-06-14 Thread steve
On Fri, 2013-06-14 at 18:05 +0400, Vladimir A Fomkin wrote:
 Hello Marc!
 Thank you for response!
 I added this string in smb.conf on PDC and BDC, but after sync BDC again do
 not give access. I see UID for files created for one user via PDC - 322
 and via BDC - 319

Hi
Make sure that you have the rfc2307 line in both the DC's. Add:
uidNumber: 322
to the the DN of the user on one of the DC's. Wait a few minutes. Now
create a file. It will have uid 322 no matter which DC is consulted.
HTH
Steve
 

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


Re: [Samba] samba and server availability

2013-06-14 Thread Marc Muehlfeld

Hello Blake,

Am 14.06.2013 15:58, schrieb Blake Patton:
 thanks for your reply. There is no wireless on the network. 2
 interface cards. one for the inside of the network, and one for the
 dirty interface (internet).

Then I misunderstood that. But this isn't a problem, because then it's 
clear, that you don't want to listen Samba on that interface for sure.


Add
interfaces = lo eth0
to your smb.conf and restart Samba (replace eth0 if this isn't your 
internal NIC). Let Samba listen on all interfaces (+ loopback), you want 
to serve to.





 This box is set up the same
 as my others ( 9 at this time) although they don't have connectivity
 issues, the internet is always up.

How are the others connected to the internet? Is it the same than the 
problem-box (one NIC to LAN, one NIC to I-Net)? And is their Internet 
connection the same (wireless or is it stable and wired)?





 I suspect (guess) it has something to do with dns,...

If the clients can still resolve their own domain stuff, it should work. 
You can configure the problem-box to forward DNS requests to one of your 
working hosts. Then exclude this.





 ... but why would the server disappear from
 network neighborhood, or in Win 7 the network.

What version of Samba do you run? If 4, do you run it in AD mode or 
NT4-style? Samba 4 in AD mode, doesn't have Netbios browsing (network 
neighbourhood) yet:


https://wiki.samba.org/index.php/Samba_4.0_Features_added/changed#Known_Issues
 There is no NetBIOS browsing support (network neighbourhood)
 available for the AD domain controller. (Support in nmbd and smbd for
 classic domains and member/standalone servers is unchanged).



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


Re: [Samba] Samba + LDAP: Issue adding machine.

2013-06-14 Thread Gaiseric Vandal
I would compare the LDAP attributes between a problem machine and a 
working machine.Each machine has to have a unique unix account name 
and SID.


Normally you don't need to precreate the samba acct with smbpasswd -a 
-m or pdbedit.  However it may help with the diagnostics to see 
what is not getting created.  If you use smbpasswd or pdbedit to create 
the account, then use the ldap editor to fill in the missing attributes 
then you should be able to join the domain.



Also double check that machine accounts are not being created in some 
other LDAP ou than you expected.you might be trying to fix one ldap 
entry while samba is creating one somewhere else.



It gets tricky when you use smbpasswd or pdbedit to create an account 
and it sees some attributes ther



On 06/14/13 07:49, Luis H. Forchesatto wrote:

Hi Gaiseric

Thanks for the reply.

I believe the problem is not the flags but I will check them again as 
you suggested. I've found quite annoying this problem because is not 
on my network, it's on a remote network and I need to move physically 
to another place in order to test the environment, quite boring also.


Regarding the sambaPrimaryGroupSID I'll check again but I believe it 
MAY be the problem :) Also, can this cause this problem? Another 
machine was already created previously... something like?



2013/6/10 Gaiseric Vandal gaiseric.van...@gmail.com 
mailto:gaiseric.van...@gmail.com


I found that Samba 3.5.x has trouble creating the LDAP attributes
correctly on new machine accounts . I think Samba 3.4.x was OK.  
  Rejoining a machine to a domain was usually OK. You need may

need to do a mix of account creation with smbpasswd and LDAP
modification with the LDAP editor.


  It appears to incorrectly set sambaAccountFlags as [U] (user)
instead of  [W] (workstation).   When attempting to join a
machine to the domain you may get an error that the account
already exists.  Use an LDAP editor to make sure sambaAccountFlags
is set to  [W].   (You can used pbedit to verify the setting but
not to change it to [W].)

type:  sambaAccountFlags
value: [W ]

If, when joining a domain,  you get an error that the the
specified network password is not correct.  you may need to
precreate the samba account attribues with the pdbedit or
smbpasswd commands .Try the following on spooky

#smbpasswd -x -m machinename

#smbpasswd -a -m machinename


You MAY also need to make sure that the sambaPrimaryGroupSID is
also set.  It should end with 515.

type:  sambaPrimaryGroupSID
value:S-1-5-21-xxx-xxx-xxx-515







On 06/10/13 08:33, Luis H. Forchesatto wrote:

Greetings.

I've run into a trouble when trying to add a new Win7 machine
on a domain.
The domain is controlled by a server running Samba + LDAP
(samba compiled
with ldap support), on a Debian 5 OS at the local network.

I've added the machine name to the LDAP three through
phpldapadmin using
the option Samba3 Machine on the related submenu and via
terminal on
samba. Then I renamed the new machine to match the computer
name and tried
to add it to the domain. When prompted for credentials to add
the new
machine I've informed the admin login and password and hit
enter.

The windows then returned the following error (something
like): The
junction operation was not well succeded. Maybe another
existent machine
account machine_account_name was created previously using
anothet set of
credentials. User another computer name or contact the admin
to remove any
obsolete conflicting account. Error: Access denied.

Any ideas for the troubleshoot will be welcome.


-- 
To unsubscribe from this list go to the following URL and read the

instructions: https://lists.samba.org/mailman/options/samba




--
Att.*
*
Luis H. Forchesatto



--
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 v3-6-test updated

2013-06-14 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  acae464 Bug 8997: change libreplace GPL source to LGPL
  from  242cc0b When message-type is drvupgrade, MSG_DEBUG should be 
replaced with MSG_PRINTER_DRVUPGRADE.

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


- Log -
commit acae464f7fedd96bbddaed5227756328ea0fe32d
Author: David Disseldorp dd...@samba.org
Date:   Mon Jun 3 13:00:31 2013 +0200

Bug 8997: change libreplace GPL source to LGPL

libreplace currently includes socket.c and getifaddrs.c both of which
are GPL licensed.
Although not required, talloc and tdb build alongside this source,
leading to some ambiguity regarding their LGPL licences.

The following copyright holders have agreed to the GPL-LGPL change:
lib/replace/getifaddrs.c
   Copyright (C) Andrew Tridgell 1998
   Copyright (C) Jeremy Allison 2007
   Copyright (C) Jelmer Vernooij jel...@samba.org 2007

lib/replace/test/getifaddrs.c
lib/replace/socket.c
 * Copyright (C) Michael Adam ob...@samba.org 2008

Signed-off-by: David Disseldorp dd...@samba.org

Reviewed-by: Andrew Bartlett abart...@samba.org

(cherry picked from commit 8a6743e4edcdff1c7860d150720483f19f3b33bb)

---

Summary of changes:
 lib/replace/getifaddrs.c  |   28 
 lib/replace/socket.c  |   22 +-
 lib/replace/test/getifaddrs.c |   24 ++--
 3 files changed, 43 insertions(+), 31 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/getifaddrs.c b/lib/replace/getifaddrs.c
index 84d7906..8da022f 100644
--- a/lib/replace/getifaddrs.c
+++ b/lib/replace/getifaddrs.c
@@ -4,19 +4,23 @@
Copyright (C) Andrew Tridgell 1998
Copyright (C) Jeremy Allison 2007
Copyright (C) Jelmer Vernooij jel...@samba.org 2007
-   
-   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 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
+
+ ** NOTE! The following LGPL license applies to the replace
+ ** library. This does NOT imply that all of Samba is released
+ ** under the LGPL
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+
+   This library 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, see http://www.gnu.org/licenses/.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see http://www.gnu.org/licenses/.
 */
 
 #define SOCKET_WRAPPER_NOT_REPLACE
diff --git a/lib/replace/socket.c b/lib/replace/socket.c
index 35e975f..4cd9d2e 100644
--- a/lib/replace/socket.c
+++ b/lib/replace/socket.c
@@ -5,18 +5,22 @@
  *
  * Copyright (C) Michael Adam ob...@samba.org 2008
  *
- * 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 3 of the License, or
- * (at your option) any later version.
+ *   ** NOTE! The following LGPL license applies to the replace
+ *   ** library. This does NOT imply that all of Samba is released
+ *   ** under the LGPL
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library 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.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see http://www.gnu.org/licenses/.
+ * You should have received a 

[SCM] Samba Shared Repository - branch v4-0-test updated

2013-06-14 Thread Karolin Seeger
The branch, v4-0-test has been updated
   via  45ba921 Bug 8997: change libreplace GPL source to LGPL
   via  897bfd1 s4-dfs_server: check for netbios aliases in 
ad_get_referrals (bug #9947)
  from  57a6c8f dns: Support larger queries when asking forwarder

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


- Log -
commit 45ba92168ae958948986dab56e9024252370d2b6
Author: David Disseldorp dd...@samba.org
Date:   Mon Jun 3 13:00:31 2013 +0200

Bug 8997: change libreplace GPL source to LGPL

libreplace currently includes socket.c and getifaddrs.c both of which
are GPL licensed.
Although not required, talloc and tdb build alongside this source,
leading to some ambiguity regarding their LGPL licences.

The following copyright holders have agreed to the GPL-LGPL change:
lib/replace/getifaddrs.c
   Copyright (C) Andrew Tridgell 1998
   Copyright (C) Jeremy Allison 2007
   Copyright (C) Jelmer Vernooij jel...@samba.org 2007

lib/replace/test/getifaddrs.c
lib/replace/socket.c
 * Copyright (C) Michael Adam ob...@samba.org 2008

Signed-off-by: David Disseldorp dd...@samba.org

Reviewed-by: Andrew Bartlett abart...@samba.org

(cherry picked from commit 8a6743e4edcdff1c7860d150720483f19f3b33bb)

Autobuild-User(v4-0-test): Karolin Seeger ksee...@samba.org
Autobuild-Date(v4-0-test): Fri Jun 14 10:53:57 CEST 2013 on sn-devel-104

commit 897bfd1db60baf0690471b32b6b68b61cee3e2df
Author: Björn Baumbach b...@sernet.de
Date:   Wed Jun 5 15:01:14 2013 +0200

s4-dfs_server: check for netbios aliases in ad_get_referrals (bug #9947)

Without this patch ad_get_referrals checks for netbios, dns names
and ip, but not for netbios aliases set by netbios aliases option,
whether the requested name is our dns name.

Pair-programmed-with: Stefan Metzmacher me...@samba.org

Signed-off-by: Björn Baumbach b...@sernet.de
Signed-off-by: Stefan Metzmacher me...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

Autobuild-User(master): Michael Adam ob...@samba.org
Autobuild-Date(master): Tue Jun 11 01:12:08 CEST 2013 on sn-devel-104
(cherry picked from commit 424a990e34278fae4888b00affb530ed1fbcb354)

---

Summary of changes:
 dfs_server/dfs_server_ad.c|   35 +++
 lib/replace/getifaddrs.c  |   28 
 lib/replace/socket.c  |   22 +-
 lib/replace/test/getifaddrs.c |   24 ++--
 4 files changed, 78 insertions(+), 31 deletions(-)


Changeset truncated at 500 lines:

diff --git a/dfs_server/dfs_server_ad.c b/dfs_server/dfs_server_ad.c
index ceabe05..8fa143d 100644
--- a/dfs_server/dfs_server_ad.c
+++ b/dfs_server/dfs_server_ad.c
@@ -751,6 +751,7 @@ NTSTATUS dfs_server_ad_get_referrals(struct 
loadparm_context *lp_ctx,
const char *dns_domain;
const char *netbios_name;
const char *dns_name;
+   const char **netbios_aliases;
 
if (!lpcfg_host_msdfs(lp_ctx)) {
return NT_STATUS_FS_DRIVER_REQUIRED;
@@ -827,6 +828,40 @@ NTSTATUS dfs_server_ad_get_referrals(struct 
loadparm_context *lp_ctx,
return NT_STATUS_NOT_FOUND;
}
 
+   netbios_aliases = lpcfg_netbios_aliases(lp_ctx);
+   while (netbios_aliases  *netbios_aliases) {
+   const char *netbios_alias = *netbios_aliases;
+   char *dns_alias;
+   int cmp;
+
+   cmp = strcasecmp_m(server_name, netbios_alias);
+   if (cmp == 0) {
+   /*
+* If it is not domain related do not
+* handle it here.
+*/
+   return NT_STATUS_NOT_FOUND;
+   }
+
+   dns_alias = talloc_asprintf(r, %s.%s,
+   netbios_alias,
+   dns_domain);
+   if (dns_alias == NULL) {
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   cmp = strcasecmp_m(server_name, dns_alias);
+   talloc_free(dns_alias);
+   if (cmp == 0) {
+   /*
+* If it is not domain related do not
+* handle it here.
+*/
+   return NT_STATUS_NOT_FOUND;
+   }
+   netbios_aliases++;
+   }
+
if ((strcasecmp_m(server_name, netbios_domain) != 0) 
(strcasecmp_m(server_name, dns_domain) != 0)) {
/*
diff --git a/lib/replace/getifaddrs.c b/lib/replace/getifaddrs.c
index 84d7906..8da022f 100644
--- a/lib/replace/getifaddrs.c
+++ b/lib/replace/getifaddrs.c
@@ -4,19 +4,23 @@

[SCM] Samba Shared Repository - branch master updated

2013-06-14 Thread Jeremy Allison
The branch, master has been updated
   via  c71d6ec genrand: Slightly simplify do_reseed
   via  dd0e38b tevent: Fix Coverity ID 989236 Operands don't affect result
  from  f1781ad dsdb: remove a wrong comment in 
dsdb_check_access_on_dn_internal()

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


- Log -
commit c71d6ecbcb463dca64118652e941bb0a162d306f
Author: Volker Lendecke v...@samba.org
Date:   Thu Jun 13 21:55:43 2013 +0200

genrand: Slightly simplify do_reseed

The only caller set use_fd to true.

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Jeremy Allison j...@samba.org

Autobuild-User(master): Jeremy Allison j...@samba.org
Autobuild-Date(master): Fri Jun 14 20:29:56 CEST 2013 on sn-devel-104

commit dd0e38b5feb51c8aa44e76bb6c84202bf8373005
Author: Volker Lendecke v...@samba.org
Date:   Thu Jun 13 20:35:32 2013 +0200

tevent: Fix Coverity ID 989236 Operands don't affect result

unsigned could be less than uint64_t, so idx==UINT64_MAX is always false.

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Jeremy Allison j...@samba.org

---

Summary of changes:
 lib/tevent/tevent_poll.c |2 +-
 lib/util/genrand.c   |   24 +++-
 2 files changed, 12 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent_poll.c b/lib/tevent/tevent_poll.c
index c6e2a00..75d0ced 100644
--- a/lib/tevent/tevent_poll.c
+++ b/lib/tevent/tevent_poll.c
@@ -546,7 +546,7 @@ static int poll_event_loop_poll(struct tevent_context *ev,
   the handler to remove itself when called */
 
for (fde = ev-fd_events; fde; fde = fde-next) {
-   unsigned idx = fde-additional_flags;
+   uint64_t idx = fde-additional_flags;
struct pollfd *pfd;
uint16_t flags = 0;
 
diff --git a/lib/util/genrand.c b/lib/util/genrand.c
index 3dfaf08..0e5902f 100644
--- a/lib/util/genrand.c
+++ b/lib/util/genrand.c
@@ -163,25 +163,23 @@ static void do_filehash(const char *fname, unsigned char 
*the_hash)
  above...
 **/
 
-static int do_reseed(bool use_fd, int fd)
+static int do_reseed(int fd)
 {
unsigned char seed_inbuf[40];
uint32_t v1, v2; struct timeval tval; pid_t mypid;
int reseed_data = 0;
 
-   if (use_fd) {
-   if (fd == -1) {
-   fd = open( /dev/urandom, O_RDONLY,0);
-   if (fd != -1) {
-   smb_set_close_on_exec(fd);
-   }
-   }
-   if (fd != -1
-(read(fd, seed_inbuf, sizeof(seed_inbuf)) == 
sizeof(seed_inbuf))) {
-   seed_random_stream(seed_inbuf, sizeof(seed_inbuf));
-   return fd;
+   if (fd == -1) {
+   fd = open( /dev/urandom, O_RDONLY,0);
+   if (fd != -1) {
+   smb_set_close_on_exec(fd);
}
}
+   if (fd != -1
+(read(fd, seed_inbuf, sizeof(seed_inbuf)) == 
sizeof(seed_inbuf))) {
+   seed_random_stream(seed_inbuf, sizeof(seed_inbuf));
+   return fd;
+   }
 
/* Add in some secret file contents */
 
@@ -244,7 +242,7 @@ _PUBLIC_ void generate_random_buffer(uint8_t *out, int len)
}
}
 
-   urand_fd = do_reseed(true, urand_fd);
+   urand_fd = do_reseed(urand_fd);
done_reseed = true;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2013-06-14 Thread Stefan Metzmacher
The branch, master has been updated
   via  9f25ad4 librpc: Shorten dcerpc_binding_handle_call a bit
   via  7982d2a librpc: Use tevent_req_poll_ntstatus
   via  20bede7 libsmbclient: Fix typos
   via  fffb701 tsocket: Add some const
   via  cf86f3e gencache: Simplify gencache_init a bit
  from  c71d6ec genrand: Slightly simplify do_reseed

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


- Log -
commit 9f25ad44a93da09b3a7c14a4a1a0e78c5a1b529c
Author: Volker Lendecke v...@samba.org
Date:   Thu Jun 6 11:37:59 2013 +0200

librpc: Shorten dcerpc_binding_handle_call a bit

... saves 200 bytes on 64 bit Linux with -O3

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

Autobuild-User(master): Stefan Metzmacher me...@samba.org
Autobuild-Date(master): Fri Jun 14 22:27:43 CEST 2013 on sn-devel-104

commit 7982d2aff89c7ff8a2371163bad5f9f88be6af46
Author: Volker Lendecke v...@samba.org
Date:   Thu Jun 6 11:31:37 2013 +0200

librpc: Use tevent_req_poll_ntstatus

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

commit 20bede7baa3576aa0f97ceb2533db6e33d587b69
Author: Volker Lendecke v...@samba.org
Date:   Thu May 16 10:26:09 2013 +0200

libsmbclient: Fix typos

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

commit fffb70168d8031dc1999fab963263ac7d3a2442a
Author: Volker Lendecke v...@samba.org
Date:   Tue Jun 11 19:36:09 2013 +0200

tsocket: Add some const

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

commit cf86f3e81b4e228d5f85cac283c51ca7d5e0cd16
Author: Volker Lendecke v...@samba.org
Date:   Tue Jun 11 21:03:22 2013 +0200

gencache: Simplify gencache_init a bit

Use the implicit cleanup facility CLEAR_IF_FIRST provides

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

---

Summary of changes:
 lib/tsocket/tsocket.h  |4 ++--
 lib/tsocket/tsocket_bsd.c  |2 +-
 librpc/rpc/binding_handle.c|   22 +++---
 source3/include/libsmbclient.h |8 
 source3/lib/gencache.c |   29 -
 5 files changed, 30 insertions(+), 35 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tsocket/tsocket.h b/lib/tsocket/tsocket.h
index 98f864e..6b0eef6 100644
--- a/lib/tsocket/tsocket.h
+++ b/lib/tsocket/tsocket.h
@@ -897,12 +897,12 @@ struct sockaddr;
  * @return  0 on success, -1 on error with errno set.
  */
 int tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
- struct sockaddr *sa,
+ const struct sockaddr *sa,
  size_t sa_socklen,
  struct tsocket_address **addr);
 #else
 int _tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
-  struct sockaddr *sa,
+  const struct sockaddr *sa,
   size_t sa_socklen,
   struct tsocket_address **_addr,
   const char *location);
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c
index 89e5f4c..4417f8e 100644
--- a/lib/tsocket/tsocket_bsd.c
+++ b/lib/tsocket/tsocket_bsd.c
@@ -209,7 +209,7 @@ struct tsocket_address_bsd {
 };
 
 int _tsocket_address_bsd_from_sockaddr(TALLOC_CTX *mem_ctx,
-  struct sockaddr *sa,
+  const struct sockaddr *sa,
   size_t sa_socklen,
   struct tsocket_address **_addr,
   const char *location)
diff --git a/librpc/rpc/binding_handle.c b/librpc/rpc/binding_handle.c
index 89ada1d..9354bbd 100644
--- a/librpc/rpc/binding_handle.c
+++ b/librpc/rpc/binding_handle.c
@@ -515,7 +515,7 @@ NTSTATUS dcerpc_binding_handle_call(struct 
dcerpc_binding_handle *h,
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev;
struct tevent_req *subreq;
-   NTSTATUS status;
+   NTSTATUS status = NT_STATUS_NO_MEMORY;
 
/*
 * TODO: allow only one sync call
@@ -527,30 +527,22 @@ NTSTATUS dcerpc_binding_handle_call(struct 
dcerpc_binding_handle *h,
ev = samba_tevent_context_init(frame);
}
if (ev == NULL) {
-   talloc_free(frame);
-   return NT_STATUS_NO_MEMORY;
+   goto fail;
}
 
subreq = dcerpc_binding_handle_call_send(frame, ev,