[Samba] Samba4: Replication of DNS data from one AD server to another

2013-01-07 Thread Dominic Evans
Hi,

As per the Samba 4.0.0 release notes:


 Replication of DNS data from one AD server to another may not work.
   The DNS data used by the internal DNS server and bind9_dlz is stored
   in an application partition in our directory.  The replication of
   this partition is not yet reliable.


I have noticed in the process of my migration tests that changes for a
particular hostname entry in the master DNS server (running on a Win 2003
DC) are not getting propagated through to the secondary DC running on Samba
4. The secondary server never seems to add an entry for this particular
hostname, despite deletion and recreation on the master DNS server. New
additions with different hostnames do get replicated across correctly; it
just appears to be a problem with this one hostname.

I'm assuming that the secondary DC somehow has a corrupt DNS entry for this
hostname. Is is possible to purge all the DNS entries on the secondary
controller and force it to do a clean recreate from the master DC?
Alternatively, can I use ldbedit/ldbsearch to try and clear any erroneous
data for the single hostname?
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] ANNOUNCE: cifs-utils release 5.9 ready for download

2013-01-07 Thread Jeff Layton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

With the merge of the new plugin interface, it's probably a good time
for a new cifs-utils release. Distro packagers should take special note
of the changes with the new plugin interface since it has implications
for how the tools are packaged. In particular, it's necessary to set a
symlink to the plugin in the correct location
(/etc/cifs-utils/idmap-plugin by default).

Here are the main highlights:

* There is a new plugin architecture for the ID mapping tools. This
  encapsulates the winbind interfaces inside a plugin and allows the
  writing of others.

* The DOMAIN\username@password format for username= arguments have been
  deprecated. The discrete mount options for each of those values
  should be used instead.

* Full RELRO (vs. partial) is now enabled on all binaries by default

Go forth and download!

webpage:https://wiki.samba.org/index.php/LinuxCIFS_utils
tarball:ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/
git:git://git.samba.org/cifs-utils.git
gitweb: http://git.samba.org/?p=cifs-utils.git;a=summary

Detailed list of changes since 5.8:

commit 92e12ecc28ac1a41eb48f693837be0ba070dc8af
Author: Jeff Layton jlay...@samba.org
Date:   Thu Nov 15 15:22:13 2012 -0500

autoconf: set version to 5.8.1 for interim builds

Signed-off-by: Jeff Layton jlay...@samba.org

commit 8b6e0cc242fc62436b0dd073e393bbdd62f39a83
Author: Jeff Layton jlay...@samba.org
Date:   Sun Nov 18 20:38:38 2012 -0500

mount.cifs: treat uid=,gid=,cruid= options as name before assuming they're 
a number

Sergio Conrad reported a problem trying to set up an autofs map to do
a krb5 mount. In his environment, many users have usernames that are
comprised entirely of numbers. While that's a bit odd, POSIX apparently
allows for it.

The current code assumes that when a numeric argument is passed to one
of the above options, that it's a uid or gid. Instead, try to treat the
argument as a user or group name first, and only try to treat it as a
number if that fails.

Signed-off-by: Jeff Layton jlay...@samba.org

commit de299f69392c18dc71d207482566f38abc909837
Author: Jeff Layton jlay...@samba.org
Date:   Wed Nov 28 15:17:44 2012 -0500

mount.cifs: don't pass flag options to the kernel

When certain options are passed to the mount helper, we want to turn
them into mountflags for the mount() syscall. There's no need to copy
them to the options string in that case though.

Signed-off-by: Jeff Layton jlay...@samba.org

commit 7e3149fe1529f0043f4fdf60082ea359ae8d656f
Author: Jeff Layton jlay...@samba.org
Date:   Mon Dec 3 11:03:19 2012 -0500

autotools: remove unnecessary files from distro

Having them in the distro prevents autoreconf -i from installing the latest
copies.

Signed-off-by: Jeff Layton jlay...@samba.org

commit 7dacd96a24edf9ab2e3d7ed798bd28bba5425349
Author: Jeff Layton jlay...@samba.org
Date:   Mon Dec 3 13:41:12 2012 -0500

getcifsacl: use size instead of reconverting original field to host endian

Signed-off-by: Jeff Layton jlay...@samba.org

commit c1fd5753a3f996203e4b39158e360f4b799a3254
Author: Jeff Layton jlay...@samba.org
Date:   Tue Dec 4 06:12:13 2012 -0500

getcifsacl: free strings returned by wbcLookupSid

Signed-off-by: Jeff Layton jlay...@samba.org

commit bacbbf7c0994bdeaf49234abd07d840673d37e95
Author: Jeff Layton jlay...@samba.org
Date:   Tue Dec 4 06:21:06 2012 -0500

getcifsacl: ensure that we don't overrun the wbcDomainSid when converting

If we get a SID that contains more than 15 subauthorities, we'll end up
overrunning the struct wbcDomainSid. Just ignore any past 15.

Signed-off-by: Jeff Layton jlay...@samba.org

commit 2584e62c06dbea59bbd6a001040d7780959c8358
Author: Jeff Layton jlay...@samba.org
Date:   Thu Dec 6 06:45:57 2012 -0500

autoconf: enable full RELRO in cifs-utils binaries

This is safer since it also protects the GOT from getting clobbered.

Signed-off-by: Jeff Layton jlay...@samba.org

commit 53894f4e2cb4d15fedf0612e9a4bd47a537284b3
Author: Jeff Layton jlay...@samba.org
Date:   Thu Dec 6 07:17:17 2012 -0500

cifs-utils: only link in -lrt to binaries that need it

...which is really only mount.cifs.

Cc:  Björn Jacke b...@sernet.de
Signed-off-by: Jeff Layton jlay...@samba.org

commit fac79a1425a1474f0daf0795900d227307ec5db3
Author: Jeff Layton jlay...@samba.org
Date:   Fri Dec 7 08:39:16 2012 -0500

getcifsacl: remove unneeded openlog() call

getcifsacl doesn't log to syslog, so there's no need to open a channel
to it. Also, remove the unneeded prog global variable since only
the usage() function needs it.

Signed-off-by: Jeff Layton jlay...@samba.org

commit b4dc50798e6baf026d6101ff3775ffc0c3a0e2f2
Author: Jeff Layton jlay...@samba.org
Date:   Fri Dec 7 12:07:23 2012 -0500

setcifsacl: 

Re: [Samba] SaMBa 4.0 - homedir mapping

2013-01-07 Thread Stephen Jones
The short answer is yes.  Do it from Active Directory Users  Computers
when creating the user account.  ADUC is available by installing the
RSAT tools on a Windows client joined to the domain.

Initial setup is to create the share for user home directories.  For
example, create the directory /home/DOMAIN and share this as 'users' by
adding the share definition to smb.conf file.  Only required settings
are the path and read only = no.  

Login to Windows as Administrator.  It is important to set the
permissions right first.  Browse to \\server\users and open the security
properties.  Remove any entries other than Administrator.  Add an entry
for Domain Users with read and execute permissions for this folder only.
 You can optionally add an entry for Domain Admins with full control for
this folder, subfolders and files.  

Now open ADUC and add a user account.  In the profile tab, under home
folder, select a drive letter and enter the path
\\server\users\username.  This will create the folder with the correct
permissions and will be automatically mapped when the user logs in.

Regards,

Stephen Jones
Lloyd Systems Engineering


On Mon, Jan 7, 2013, at 09:45 AM, Celso Viana wrote:
 Hi all,
 
 In Samba 4.0 is possible to map the user's home directory
 automatically without user intervention?
 
 Thanks
 
 -- 
 Celso Vianna
 BSD User: 51318
 http://www.bsdcounter.org
 Palmas/TO
 -- 
 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] [4.0] Machine account creation

2013-01-07 Thread Kaito Kumashiro
Hello


I have a  Samba 4.0 DC and I want to add a new machine account manually. I
cannot use 'net ads join', because there is no (and cannot be) Samba client
on that machine. I need to use samba-tool for this.

When I issue a command:

  samba-tool user add MACHINE$ --random-password --userou=CN=Computers

the account is created, but for a user named MACHINE$ (with all LDAP
attributes for a user), not for computer with name MACHINE. I still can
use it for KRB authentication (I can bind SPN to it), but it would be great
if this account would show up as a computer in ADUC.
How can I add a machine account manually?


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


[Samba] Samba 4.0.0 - Browseable option don't work

2013-01-07 Thread Bruno Pereira
Hello,

I configured some shares with the option browseable = No but this
share still browseable.

my smb.conf:

[global]
workgroup = CENA-C
realm = cena-c.pt
netbios name = SAMBA
server role = active directory domain controller
template shell = /bin/bash
server services = rpc, nbt, wrepl, ldap, cldap, kdc, drepl,
winbind, ntp_signd, kcc, dnsupdate, dns, smb
dcerpc endpoint servers = epmapper, wkssvc, rpcecho, samr,
netlogon, lsarpc, spoolss, drsuapi, dssetup, unixinfo, browser,
eventlog6, backupkey, dnsserver, winreg, srvsvc
idmap_ldb:use rfc2307  = yes
include = /usr/local/samba/etc/allconfs.conf

[profiles]
comment = Network Profiles Share
path = /home1/_profiles
read only = No
create mask = 0600
directory mask = 0700
profile acls = Yes
store dos attributes = Yes
browseable = No
csc policy = disable

[tmp]
comment = Temporary file space
path = /tmp
read only = No
guest ok = Yes
browseable = No

[Share1]
comment = Share1
path = /home1/_shares/share1
read only = No
browseable = No

[netlogon]
path = /usr/local/samba/var/locks/sysvol/cena-c.pt/scripts
read only = No

[sysvol]
path = /usr/local/samba/var/locks/sysvol
read only = No

I restarted the connection but nothing happened.
Can anyone help me with this question?


Bruno Pereira

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


[Samba] Getting Element not found (I only have the german error) if accessing the shars by \\realm.name\!

2013-01-07 Thread Florian Scholz
Hi, SAMBA users,

If I try to access the shares by \\samdom.asta.lan I get an element
not found error but if I access it with the samba servers ip address,
everything works just fine! I'm using samba4 4.0.0-1


Greets

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


Re: [Samba] Samba 4.0.0 - Browseable option don't work

2013-01-07 Thread Hleb Valoshka
On 1/7/13, Bruno Pereira bpere...@ipbrick.com wrote:
 I configured some shares with the option browseable = No but this
 share still browseable.
 server services = ... smb

I guess the reason is the ntvfs. Try s3fs.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] SaMBa 4.0 - homedir mapping

2013-01-07 Thread Adam Sienkiewicz
Hi I tryed this option but it is not work - I wrote about it in
another post. My symtomps are: I set permission as given there:
http://blogs.technet.com/b/askds/archive/2008/06/30/automatic-creation-of-user-folders-for-home-roaming-profile-and-redirected-folders.aspx?Redirected=true

but I have a situation - I can create AD user account via linux commanline
/usr/local/samba/bin/samba-tool user create demo9 p@ssw0rd
--profile-path=\\\deb7smb4ad.szyb.local\profiles\demo9
--home-drive=H: --home-directory=\\deb7smb4ad.szyb.local\home2\demo9
User 'demo9' created successfully

Account is working, profile is automatically created in profile share
during firt logon, but home dir not.
Can someone how to do that ? I will have few hundred account and I
really need autocreation home users dir automatically

I hope someone resolved this problem 


2013/1/7, Stephen Jones lloydsyst...@fastmail.com.au:
 The short answer is yes.  Do it from Active Directory Users  Computers
 when creating the user account.  ADUC is available by installing the
 RSAT tools on a Windows client joined to the domain.

 Initial setup is to create the share for user home directories.  For
 example, create the directory /home/DOMAIN and share this as 'users' by
 adding the share definition to smb.conf file.  Only required settings
 are the path and read only = no.

 Login to Windows as Administrator.  It is important to set the
 permissions right first.  Browse to \\server\users and open the security
 properties.  Remove any entries other than Administrator.  Add an entry
 for Domain Users with read and execute permissions for this folder only.
  You can optionally add an entry for Domain Admins with full control for
 this folder, subfolders and files.

 Now open ADUC and add a user account.  In the profile tab, under home
 folder, select a drive letter and enter the path
 \\server\users\username.  This will create the folder with the correct
 permissions and will be automatically mapped when the user logs in.

 Regards,

 Stephen Jones
 Lloyd Systems Engineering


 On Mon, Jan 7, 2013, at 09:45 AM, Celso Viana wrote:
 Hi all,

 In Samba 4.0 is possible to map the user's home directory
 automatically without user intervention?

 Thanks

 --
 Celso Vianna
 BSD User: 51318
 http://www.bsdcounter.org
 Palmas/TO
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

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


[Samba] Samba 4 Does not join existing domain as additional DC - Refusing to replicate from a read-only repilca into a read-write replica

2013-01-07 Thread Chris Lewis

Hello,

This behaviour may be of interest:

Attempting to join samba4.0 to an AD domain running a single 2008 R2 
server. DNS is being provided by an existing bind 9 server.


After command:

/usr/local/samba/bin/samba-tool domain join example.com DC -U Administrator  -W 
EXAMPLE --dns-backend=NONE


Process to add the DC failed at this point:

Refusing to replicate DC=DomainDnsZones,DC=example,DC=com from a 
read-only repilca into a read-write replica!
Failed to convert object DC=DomainDnsZones,DC=inview,DC=local: 
WERR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA

Failed to convert objects: WERR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA
Join failed - cleaning up


In my test environment, I did some playing around and found that I could 
delete the troublesome namespaces using ntdsutil in partition management 
mode (see 
http://technet.microsoft.com/en-us/library/cc730970%28v=ws.10%29.aspx)


ntdsutil delete nc DC=DomainDnsZones,DC=example,DC=com

and

ntdsutil delete nc DC=DomainDnsZones,DC=example,DC=com

(These naming contexts are recreated when DNS server is started on the 
Win 2008 server.)


After doing that, I got when I attempt to add the DC:

Refusing to replicate 
DC=ForestDnsZones\0ADEL:e274cb7e-9b4d-4966-bc51-c4820808d9ba,DC=inview,DC=local 
from a read-only repilca into a read-write replica!
Failed to convert object 
DC=ForestDnsZones\0ADEL:e274cb7e-9b4d-4966-bc51-c4820808d9ba,DC=inview,DC=local: 
WERR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA

Failed to convert objects: WERR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA
Join failed - cleaning up

This is because the objects still persist in AD  but are tombstoned 
(hence the 0ADEL).


To try and get rid of them, I  reduced the tombstone lifetime from 180 
days to what I gather is the minimum of 3 days (using ADSI edit).


I found after 3 days (and AD garbage collection) I was able to add the 
DC successfully.


Has anyone else come across this? It could be some peculiarity on this 
particular domain.


Thanks in advance.

Chris




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


[Samba] Password expiry

2013-01-07 Thread ray klassen
Can't disable password expiry for 2 different samba 3.X installations. One is 
based on Debian squeeze, the other Ubuntu precise. I have altered the password 
policy with pdbedit pdbedit -P maximum password age -C -1 and set the X 
flag on accounts pdbedit -c [X ] username   and the accounts passwords 
still exipre. Please help.

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


[Samba] Samba 4 Services for UNIX?

2013-01-07 Thread Robert Moggach
I have a working Samba 4.0.0 AD DC running and am able to manage users etc
using the Windows tools. Great.
Now I want to as much as possible eliminate the need for an additional
directory service (OpenLDAP and/or Open Directory) if not entirely. I need
automount working and Posix users. I believe it's possible to set this up
but haven't been able to find any solid documentation -
Can someone point me in the right direction?

Specifically I'm looking for:
1) How to install the necessary schema etc for UNIX connectivity
2) How to install/manage UNIX friendly users, groups, etc.
3) How to successfully add the automount schema (the wiki doesn't seem to
work for me)
4) How to add automount maps

Thanks!

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


Re: [Samba] Samba 4 Services for UNIX?

2013-01-07 Thread Andrew Bartlett
On Mon, 2013-01-07 at 16:21 -0500, Robert Moggach wrote:
 I have a working Samba 4.0.0 AD DC running and am able to manage users etc
 using the Windows tools. Great.
 Now I want to as much as possible eliminate the need for an additional
 directory service (OpenLDAP and/or Open Directory) if not entirely. I need
 automount working and Posix users. I believe it's possible to set this up
 but haven't been able to find any solid documentation -
 Can someone point me in the right direction?
 
 Specifically I'm looking for:
 1) How to install the necessary schema etc for UNIX connectivity
 2) How to install/manage UNIX friendly users, groups, etc.
 3) How to successfully add the automount schema (the wiki doesn't seem to
 work for me)
 4) How to add automount maps

We already include the SFU schema, and users have reported adding the
automount schema.  You should be able to make this work, but I'll leave
to other users to describe the process in more detail. 

See also:
https://wiki.samba.org/index.php/Samba4/Schema_extenstions

Andrew Bartlett

-- 
Andrew Bartletthttp://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org


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


Re: [Samba] 3.6.10 file handle leak under ancient 32-bit kernel

2013-01-07 Thread starlight . 2013q1
Realized that the differences
between the 'config.h' files
is what really matters--attached
below with good/bad order in the
pairs.

Several likely enough culprits appear
in the list and I'm willing to dig around
the code.  Can anyone suggest which
#define is the most probable cause?

Thanks

   #define HAVE_ATTR_XATTR_H 1
 /* #undef HAVE_ATTR_XATTR_H */

 /* #undef HAVE_BROKEN_POSIX_FALLOCATE */
   #define HAVE_BROKEN_POSIX_FALLOCATE

   #define HAVE_FDOPENDIR 1
 /* #undef HAVE_FDOPENDIR */

   #define HAVE_INOTIFY 1
 /* #undef HAVE_INOTIFY */

   #define HAVE_INOTIFY_INIT 1
 /* #undef HAVE_INOTIFY_INIT */

   #define HAVE_KRB5_LOCATE_PLUGIN_H 1
 /* #undef HAVE_KRB5_LOCATE_PLUGIN_H */

   #define HAVE_LINUX_DQBLK_XFS_H 1
 /* #undef HAVE_LINUX_DQBLK_XFS_H */

   #define HAVE_LINUX_FALLOC_H 1
 /* #undef HAVE_LINUX_FALLOC_H */

   #define HAVE_LINUX_INOTIFY_H 1
 /* #undef HAVE_LINUX_INOTIFY_H */

   #define HAVE_LINUX_SPLICE 1
 /* #undef HAVE_LINUX_SPLICE */

 /* #undef HAVE_NFS_QUOTAS */
   #define HAVE_NFS_QUOTAS 1

   #define HAVE_SPLICE_DECL 1
 /* #undef HAVE_SPLICE_DECL */

   #define HAVE_SYS_INOTIFY_H 1
 /* #undef HAVE_SYS_INOTIFY_H */

 /* #undef HAVE_UT_UT_TV */
   #define HAVE_UT_UT_TV 1

   #define HAVE_XFS_QUOTAS 1
 /* #undef HAVE_XFS_QUOTAS */

   #define HAVE___NR_INOTIFY_INIT_DECL 1
 /* #undef HAVE___NR_INOTIFY_INIT_DECL */

   #define SIZEOF_LONG 8
   #define SIZEOF_LONG 4

   #define SIZEOF_SIZE_T 8
   #define SIZEOF_SIZE_T 4

   #define SIZEOF_SSIZE_T 8
   #define SIZEOF_SSIZE_T 4

   #define SIZEOF_TIME_T 8
 /* #undef SIZEOF_TIME_T */

   #define SIZEOF_VOID_P 8
   #define SIZEOF_VOID_P 4

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

Re: [Samba] AIX and ADS support?

2013-01-07 Thread Benjamin Huntsman
I'm getting the impression that ADS support isn't available on AIX at all.
I built a copy of OpenLDAP, and while the configure script detects the ldap 
headers, it still says that Active Directory support is not available.

Has anyone had any luck getting this working on AIX?

Thanks in advance!

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


[Samba] Samba 4 on AIX with XLC

2013-01-07 Thread Benjamin Huntsman
Has anyone tried building Samba 4.0 on AIX with XLC?

I'm moving right along, but tripping up on some bugs in 
source3/utils/net_rpc.c, source3/utils/net_rpc_printer.c, and 
source3/utils/net_cache.c where there is an invalid use of the : operator.  
According to some other posts on the PostgreSQL forum, this shouldn't compile 
anywhere, even though GCC apparently allows it??  
(http://archives.postgresql.org/pgsql-hackers/1998-09/msg00211.php)

Maybe there's a way to skip building these components?

Anyway, here's what I'm seeing on the console:

bash-3.2# make
WAF_MAKE=1  ./buildtools/bin/waf build
Waf: Entering directory `/admin/tst/build/samba-4.0.0/bin'
Selected embedded Heimdal build
[   8/3655] Generating VERSION
[  44/3655] Generating smbd/build_options.c
[2833/3655] Compiling source3/utils/net_rpc.c
[2838/3655] Compiling source3/utils/net_cache.c
[2844/3655] Compiling source3/utils/net_rpc_printer.c
[2851/3655] Compiling source3/utils/net_rpc_shell.c
../source3/utils/net_cache.c, line 87.56: 1506-226 (S) The : operator is 
not allowed between char[1] and int.
../source3/utils/net_cache.c, line 86.18: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_cache.c, line 96.35: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_cache.c, line 184.35: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_cache.c, line 189.26: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_cache.c, line 193.27: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_cache.c, line 216.26: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_cache.c, line 220.27: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_cache.c, line 251.27: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/include/smb_ldap.h, line 69.9: 1506-236 (W) Macro name LDAP_CONST 
has been redefined.
../source3/include/smb_ldap.h, line 69.9: 1506-358 (I) LDAP_CONST is 
defined on line 50 of /opt/openldap-2.4.32/include/ldap_cdefs.h.
../source3/utils/net_rpc.c, line 88.35: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 281.35: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 389.24: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 446.35: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 482.26: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 487.26: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 539.35: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 546.35: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 559.35: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 565.35: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 580.26: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 582.26: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 583.26: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 585.26: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 586.26: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 587.26: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 645.18: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 731.34: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 736.26: 1506-280 (W) Function argument 
assignment between types const char* and int is not allowed.
../source3/utils/net_rpc.c, line 

Re: [Samba] Samba 4 on AIX with XLC

2013-01-07 Thread Benjamin Huntsman
As a further follow-up, here's an example, from source3/utils/net_cache.c:

d_printf(_(Key: %s\t Timeout: %s\t Value: %s  %s\n), keystr,
 timeout_str, datastr, timeout  now_t ? : _((expired)));

My C skills aren't good enough to understand what's being done here, but the 
offending bit is the last argument to d_printf:

timeout  now_t ? : _((expired))

Is there a way we can re-write this in more compatible way?

Apparently, this construction is supposed to look like:

(condition) ? (t_result) : (f_result)

and t_result and f_result must be of the same type.  So do I read that  is a 
char, and _((expired)) is an int?  Something like:

timeout  now_t ? atoi():_((expired)) maybe?

Again, just grasping here...
... or maybe there's a flag to XLC to let us get by this?

Many thanks!

-Ben

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


Re: [Samba] 3.6.10 file handle leak under ancient 32-bit kernel

2013-01-07 Thread starlight . 2013q1
Ah, and of course a 'strace'.

   http://binnacle.cx/file/smbd_file_leak_strace.txt

The leak appears related to the

open(log)

events where /var/log is opened and
scanned periodically.  See three
'open' calls without any matching
close.

Most of the /proc/###/fd entries
are for /var/log, but a couple are
for other files:


# ls -o /proc/15056/fd | sort -k8,8n
.
.
.
lr-x--  1 root 64 Jan  7 17:48 531 - /var/log
lr-x--  1 root 64 Jan  7 17:48 532 - /var/log
lr-x--  1 root 64 Jan  7 17:48 533 - /w
lr-x--  1 root 64 Jan  7 17:48 534 - /var/log
lr-x--  1 root 64 Jan  7 17:48 535 - /var/log
lr-x--  1 root 64 Jan  7 17:48 536 - /w/home
lr-x--  1 root 64 Jan  7 17:48 537 - /w/home/awle
lr-x--  1 root 64 Jan  7 17:48 538 - /w/home/awle
lr-x--  1 root 64 Jan  7 17:48 539 - /w/home/awle
lr-x--  1 root 64 Jan  7 17:48 540 - /var/log
lr-x--  1 root 64 Jan  7 17:48 541 - /var/log
lr-x--  1 root 64 Jan  7 17:48 542 - /var/log
.
.
.
lr-x--  1 root 64 Jan  7 17:48 572 - /var/log
lr-x--  1 root 64 Jan  7 17:48 573 - /var/log
lr-x--  1 root 64 Jan  7 17:48 574 - /var/log
lr-x--  1 root 64 Jan  7 17:49 575 - /var/log
l-wx--  1 root 64 Jan  7 17:49 576 - 
/usr/local/samba/var/clientlog/ciannait.log
lr-x--  1 root 64 Jan  7 17:49 577 - /var/log
lr-x--  1 root 64 Jan  7 17:49 578 - /var/log
lr-x--  1 root 64 Jan  7 17:49 579 - /var/log

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


Re: [Samba] Samba 4 on AIX with XLC

2013-01-07 Thread Jeremy Allison
On Mon, Jan 07, 2013 at 10:58:08PM +, Benjamin Huntsman wrote:
 As a further follow-up, here's an example, from source3/utils/net_cache.c:
 
 d_printf(_(Key: %s\t Timeout: %s\t Value: %s  %s\n), keystr,
  timeout_str, datastr, timeout  now_t ? : _((expired)));
 
 My C skills aren't good enough to understand what's being done here, but the 
 offending bit is the last argument to d_printf:
 
 timeout  now_t ? : _((expired))
 
 Is there a way we can re-write this in more compatible way?
 
 Apparently, this construction is supposed to look like:
 
 (condition) ? (t_result) : (f_result)
 
 and t_result and f_result must be of the same type.  So do I read that  is 
 a char, and _((expired)) is an int?  Something like:
 
 timeout  now_t ? atoi():_((expired)) maybe?
 
 Again, just grasping here...
 ... or maybe there's a flag to XLC to let us get by this?

No, both  and _((expired)) should evaluate to a const char *.

Looks like the error is that _() isn't evaluating to a string
on AIX with xlc.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 4 on AIX with XLC

2013-01-07 Thread Benjamin Huntsman
On Mon, Jan 07, 2013 at 10:58:08PM +, Benjamin Huntsman wrote:
 As a further follow-up, here's an example, from source3/utils/net_cache.c:

 d_printf(_(Key: %s\t Timeout: %s\t Value: %s  %s\n), keystr,
  timeout_str, datastr, timeout  now_t ? : _((expired)));

 My C skills aren't good enough to understand what's being done here, but the 
 offending bit is the last argument to d_printf:

 timeout  now_t ? : _((expired))

 Is there a way we can re-write this in more compatible way?

 Apparently, this construction is supposed to look like:

 (condition) ? (t_result) : (f_result)

 and t_result and f_result must be of the same type.  So do I read that  is 
 a char, and _((expired)) is an int?  Something like:

 timeout  now_t ? atoi():_((expired)) maybe?

 Again, just grasping here...
 ... or maybe there's a flag to XLC to let us get by this?

No, both  and _((expired)) should evaluate to a const char *.

Looks like the error is that _() isn't evaluating to a string
on AIX with xlc.

Hi there!  Many many thanks for responding!!

Any idea how we could track it back to see why that'd be?  Did I mess it up 
during the configure, or am I the first person to try to build samba-4.0.0 on 
AIX with XLC?

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


Re: [Samba] 3.6.10 file handle leak under ancient 32-bit kernel

2013-01-07 Thread starlight . 2013q1
Looking at the good system:


open(log, O_RDONLY|O_DIRECTORY)   = 28
fstat(28, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fstat(28, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl(28, F_GETFL)  = 0x18000 (flags 
O_RDONLY|O_LARGEFILE|O_DIRECTORY)
fcntl(28, F_SETFD, FD_CLOEXEC)  = 0
getdents(28, /* 184 entries */, 32768)  = 5880
getdents(28, /* 0 entries */, 32768)= 0
close(28)   = 0

open(., O_RDONLY|O_DIRECTORY) = 28
fstat(28, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
close(28)   = 0

open(log, O_RDONLY|O_DIRECTORY)   = 28
fstat(28, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fstat(28, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl(28, F_GETFL)  = 0x18000 (flags 
O_RDONLY|O_LARGEFILE|O_DIRECTORY)
fcntl(28, F_SETFD, FD_CLOEXEC)  = 0
getdents(28, /* 184 entries */, 32768)  = 5880
getdents(28, /* 0 entries */, 32768)= 0
close(28)   = 0


Where on the bad system:

open(log, O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 509
fstat64(509, {st_mode=S_IFDIR|0751, st_size=4096, ...}) = 0
fcntl64(509, F_SETFD, FD_CLOEXEC)   = 0
getdents64(509, /* 129 entries */, 4096) = 4072
getdents64(509, /* 46 entries */, 4096) = 1488
getdents64(509, /* 0 entries */, 4096)  = 0
close(509)  = 0

open(., O_RDONLY|O_LARGEFILE|O_DIRECTORY) = 509
fstat64(509, {st_mode=S_IFDIR|0751, st_size=4096, ...}) = 0
close(509)  = 0

open(log, O_RDONLY|O_LARGEFILE|O_DIRECTORY) = 509
fstat64(509, {st_mode=S_IFDIR|0751, st_size=4096, ...}) = 0

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


Re: [Samba] Samba 4 on AIX with XLC

2013-01-07 Thread Michael Wood
Hi

On 8 January 2013 02:16, Benjamin Huntsman
bhunts...@mail2.cu-portland.edu wrote:
On Mon, Jan 07, 2013 at 10:58:08PM +, Benjamin Huntsman wrote:
 As a further follow-up, here's an example, from source3/utils/net_cache.c:

 d_printf(_(Key: %s\t Timeout: %s\t Value: %s  %s\n), keystr,
  timeout_str, datastr, timeout  now_t ? : 
 _((expired)));

 My C skills aren't good enough to understand what's being done here, but 
 the offending bit is the last argument to d_printf:

 timeout  now_t ? : _((expired))
[...]
 Any idea how we could track it back to see why that'd be?  Did I mess it up 
 during the configure, or am I the first person to try to build samba-4.0.0 on 
 AIX with XLC?

_(...) is how the localisation is done AFAIK.  i.e. it's for
translating messages into different languages.

Maybe there's something wrong with internationalisation/localisation
(i18n/l10n) on the system?  See what the configure output says about
it (maybe gettext).

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


Re: [Samba] Samba 4 on AIX with XLC

2013-01-07 Thread Benjamin Huntsman
_(...) is how the localisation is done AFAIK.  i.e. it's for
translating messages into different languages.

Maybe there's something wrong with internationalisation/localisation
(i18n/l10n) on the system?  See what the configure output says about
it (maybe gettext).

--
Michael Wood esiot...@gmail.com

Hi there!
   Thanks so much for the response!  Very interesting idea.  But I'm not sure 
what I'd be looking for.  Is gettext required?  It's almost certainly no 
present, as this is a clean build of AIX just for this compile, and I've only 
been installing things on an as-needed basis...

How would I check the configure output?

Many thanks!

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


Re: [Samba] [PATCH] Re: samba-tool domain classicupgrade with LDAP backend

2013-01-07 Thread Andrew Bartlett
On Fri, 2013-01-04 at 12:53 +0100, Juan Asensio Sánchez wrote:
 Hi Andrew
 
 
 Unfortunately, after applying the patch, recompile, uninstall and
 install again, I am getting the same error:
 
 # cd ~/samba-4.0.0
 # patch -p1 
 ~/0001-s4-libcli-resolv-Add-alias-hosts-for-host-in-name-re.patch
 # make uninstall  rm -Rf /usr/local/samba/  make clean  make 
 make install
 # samba-tool domain classicupgrade --dbdir ~/sambav3 --realm
 SSCC.SACYL.TEST --use-xattrs=yes ~/sambav3/smb.conf -d9
 
 ...
 init_sam_from_ldap: Entry found for user: XXX
 init_sam_from_ldap: Entry found for user: XXX$
 Next rid = 12801001
 Failed to connect to ldap URL 'ldap://XX.X.es' - LDAP client
 internal error: NT_STATUS_BAD_NETWORK_NAME
 Failed to connect to 'ldap://XX.X.es' with backend 'ldap':
 (null)
 Could not open ldb connection to ldap://XX.X.es, the error
 message is: (1, None)

Can you set 'log level = 10' in your smb.conf and try again, I'm very
must lost as to what the error is if this doesn't fix it.

Can you contact this host using ldbsearch?  eg:

 ldbsearch -H ldap://XX.X.es

Andrew Bartlett


-- 
Andrew Bartletthttp://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org


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

Re: [Samba] [PATCH] Re: samba-tool domain classicupgrade with LDAP backend

2013-01-07 Thread Andrew Bartlett
On Tue, 2013-01-08 at 18:42 +1100, Andrew Bartlett wrote:
 On Fri, 2013-01-04 at 12:53 +0100, Juan Asensio Sánchez wrote:
  Hi Andrew
  
  
  Unfortunately, after applying the patch, recompile, uninstall and
  install again, I am getting the same error:
  
  # cd ~/samba-4.0.0
  # patch -p1 
  ~/0001-s4-libcli-resolv-Add-alias-hosts-for-host-in-name-re.patch
  # make uninstall  rm -Rf /usr/local/samba/  make clean  make 
  make install
  # samba-tool domain classicupgrade --dbdir ~/sambav3 --realm
  SSCC.SACYL.TEST --use-xattrs=yes ~/sambav3/smb.conf -d9
  
  ...
  init_sam_from_ldap: Entry found for user: XXX
  init_sam_from_ldap: Entry found for user: XXX$
  Next rid = 12801001
  Failed to connect to ldap URL 'ldap://XX.X.es' - LDAP client
  internal error: NT_STATUS_BAD_NETWORK_NAME
  Failed to connect to 'ldap://XX.X.es' with backend 'ldap':
  (null)
  Could not open ldb connection to ldap://XX.X.es, the error
  message is: (1, None)
 
 Can you set 'log level = 10' in your smb.conf and try again, I'm very
 must lost as to what the error is if this doesn't fix it.
 
 Can you contact this host using ldbsearch?  eg:
 
  ldbsearch -H ldap://XX.X.es
 
 Andrew Bartlett

Also, can you verify that this patch makes the classicupgrade fail right
after the failed connection, rather than hobbling on and failing due to
an un-set variable?

Thanks,

Andrew Bartlett

-- 
Andrew Bartletthttp://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org

From 2f9a0fb067471d5dc411b4d77e2ed357c8303201 Mon Sep 17 00:00:00 2001
From: Andrew Bartlett abart...@samba.org
Date: Sat, 5 Jan 2013 15:19:09 +1100
Subject: [PATCH] samba-tool domain classicupgrade: Make failure to connect to
 the LDAP server fatal

This avoids a different, less clear fatal condition later in the script.

Andrew Bartlett
---
 source4/scripting/python/samba/upgrade.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py
index d680a7c..b068d44 100644
--- a/source4/scripting/python/samba/upgrade.py
+++ b/source4/scripting/python/samba/upgrade.py
@@ -788,7 +788,7 @@ Please fix this account before attempting to upgrade again
 try:
 ldb_object = Ldb(url, credentials=creds)
 except ldb.LdbError, e:
-logger.warning(Could not open ldb connection to %s, the error message is: %s, url, e)
+raise ProvisioningError(Could not open ldb connection to %s, the error message is: %s, url, e)
 else:
 break
 logger.info(Exporting posix attributes)
-- 
1.7.11.7

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

2013-01-07 Thread Volker Lendecke
The branch, master has been updated
   via  f2d67af tdb: Fix undefined prototype warnings
   via  1beb4bc tdb: Fix 
 in error messages
  from  94f11e9 s3-net: Fix rpc_service_list_internal() null pointer 
passing.

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


- Log -
commit f2d67af7bc0b316f54d6cc1a44d07f1b24244378
Author: Volker Lendecke v...@samba.org
Date:   Fri Dec 14 22:49:05 2012 +0100

tdb: Fix undefined prototype warnings

These functions are deliberately left without prototypes according to
3fdeaa399, but without prototypes we get warnings.

Reviewed-by: Rusty Russell ru...@samba.org

Autobuild-User(master): Volker Lendecke v...@samba.org
Autobuild-Date(master): Mon Jan  7 11:20:19 CET 2013 on sn-devel-104

commit 1beb4bc9d12fb124935e9e4710f48ad616dacc60
Author: Volker Lendecke v...@samba.org
Date:   Wed Dec 26 21:42:14 2012 +0100

tdb: Fix \n in error messages

Reviewed-by: Rusty Russell ru...@samba.org

---

Summary of changes:
 lib/tdb/common/lock.c  |2 ++
 lib/tdb/tools/tdbtorture.c |4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/common/lock.c b/lib/tdb/common/lock.c
index 7155a9f..b530c6e 100644
--- a/lib/tdb/common/lock.c
+++ b/lib/tdb/common/lock.c
@@ -883,12 +883,14 @@ void tdb_release_transaction_locks(struct tdb_context 
*tdb)
 /* Following functions are added specifically to support CTDB. */
 
 /* Don't do actual fcntl locking, just mark tdb locked */
+int tdb_transaction_write_lock_mark(struct tdb_context *tdb);
 _PUBLIC_ int tdb_transaction_write_lock_mark(struct tdb_context *tdb)
 {
return tdb_transaction_lock(tdb, F_WRLCK, TDB_LOCK_MARK_ONLY);
 }
 
 /* Don't do actual fcntl unlocking, just mark tdb unlocked */
+int tdb_transaction_write_lock_unmark(struct tdb_context *tdb);
 _PUBLIC_ int tdb_transaction_write_lock_unmark(struct tdb_context *tdb)
 {
return tdb_nest_unlock(tdb, TRANSACTION_LOCK, F_WRLCK, true);
diff --git a/lib/tdb/tools/tdbtorture.c b/lib/tdb/tools/tdbtorture.c
index 64c5043..04bbb7d 100644
--- a/lib/tdb/tools/tdbtorture.c
+++ b/lib/tdb/tools/tdbtorture.c
@@ -438,10 +438,10 @@ done:
db = tdb_open_ex(test_tdb, hash_size, TDB_DEFAULT,
 O_RDWR, 0, log_ctx, NULL);
if (!db) {
-   fatal(db open failed);
+   fatal(db open failed\n);
}
if (tdb_check(db, NULL, NULL) == -1) {
-   printf(db check failed);
+   printf(db check failed\n);
exit(1);
}
tdb_close(db);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2013-01-07 Thread Andreas Schneider
The branch, master has been updated
   via  6a5afa2 spoolss: add stubs for new JobNamedProperty dcerpc calls.
   via  638ed90 spoolss: add SPOOLSS_DRIVER_VERSION_2012 (4) define to IDL.
   via  22994ca spoolss: add Windows ARM architecture defines to IDL.
  from  f2d67af tdb: Fix undefined prototype warnings

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


- Log -
commit 6a5afa244203c42265207c56e95783ec740ee89e
Author: Günther Deschner g...@samba.org
Date:   Mon Jan 7 15:15:21 2013 +0100

spoolss: add stubs for new JobNamedProperty dcerpc calls.

Guenther

Signed-off-by: Günther Deschner g...@samba.org
Reviewed-by: Andreas Schneider a...@samba.org

Autobuild-User(master): Andreas Schneider a...@cryptomilk.org
Autobuild-Date(master): Mon Jan  7 19:06:25 CET 2013 on sn-devel-104

commit 638ed90620e3c6a35ef56a11c612c13d6b7d6ff5
Author: Günther Deschner g...@samba.org
Date:   Mon Jan 7 15:14:30 2013 +0100

spoolss: add SPOOLSS_DRIVER_VERSION_2012 (4) define to IDL.

Guenther

Signed-off-by: Günther Deschner g...@samba.org
Reviewed-by: Andreas Schneider a...@samba.org

commit 22994ca92ba92711e20da482292603927a82704e
Author: Günther Deschner g...@samba.org
Date:   Mon Jan 7 15:14:02 2013 +0100

spoolss: add Windows ARM architecture defines to IDL.

Guenther

Signed-off-by: Günther Deschner g...@samba.org
Reviewed-by: Andreas Schneider a...@samba.org

---

Summary of changes:
 librpc/idl/spoolss.idl  |   27 -
 source3/rpc_server/spoolss/srv_spoolss_nt.c |   44 +++
 source4/rpc_server/spoolss/dcesrv_spoolss.c |   37 ++
 3 files changed, 107 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index 1a5f5e9..06a0935 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -35,11 +35,13 @@ cpp_quote(#define spoolss_security_descriptor 
security_descriptor)
 
typedef enum {
PROCESSOR_ARCHITECTURE_INTEL= 0x,
+   PROCESSOR_ARCHITECTURE_ARM  = 0x0005,
PROCESSOR_ARCHITECTURE_IA64 = 0x0006,
PROCESSOR_ARCHITECTURE_AMD64= 0x0009
} spoolss_ProcessorArchitecture;
 
typedef [v1_enum] enum {
+   PROCESSOR_ARM   = 0x,
PROCESSOR_INTEL_386 = 0x0182,
PROCESSOR_INTEL_486 = 0x01E6,
PROCESSOR_INTEL_PENTIUM = 0x024A,
@@ -1303,7 +1305,8 @@ cpp_quote(#define spoolss_security_descriptor 
security_descriptor)
SPOOLSS_DRIVER_VERSION_9X   = 0,
SPOOLSS_DRIVER_VERSION_NT35 = 1,
SPOOLSS_DRIVER_VERSION_NT4  = 2,
-   SPOOLSS_DRIVER_VERSION_200X = 3
+   SPOOLSS_DRIVER_VERSION_200X = 3,
+   SPOOLSS_DRIVER_VERSION_2012 = 4
} spoolss_DriverOSVersion;
 
typedef struct {
@@ -1816,6 +1819,7 @@ cpp_quote(#define spoolss_security_descriptor 
security_descriptor)
const string SPL_ARCH_W32PPC= W32PPC;
const string SPL_ARCH_IA64  = IA64;
const string SPL_ARCH_X64   = x64;
+   const string SPL_ARCH_ARM   = ARM;
 
const string SPOOLSS_ARCHITECTURE_ALL   = All;
const string SPOOLSS_ARCHITECTURE_ALL_CLUSTER   = AllCluster;
@@ -1823,6 +1827,7 @@ cpp_quote(#define spoolss_security_descriptor 
security_descriptor)
const string SPOOLSS_ARCHITECTURE_IA_64 = Windows 
IA64;
const string SPOOLSS_ARCHITECTURE_x64   = Windows x64;
const string SPOOLSS_ARCHITECTURE_4_0   = Windows 4.0;
+   const string SPOOLSS_ARCHITECTURE_ARM   = Windows ARM;
const string SPOOLSS_DEFAULT_SERVER_PATH= 
C:\\WINDOWS\\system32\\spool;
 
typedef [public,gensize] struct {
@@ -3202,4 +3207,24 @@ cpp_quote(#define spoolss_security_descriptor 
security_descriptor)
/* Function: 0x6d */
[todo] WERROR spoolss_6d(
);
+
+   /**/
+   /* Function: 0x6e */
+   [todo] WERROR spoolss_RpcGetJobNamedPropertyValue(
+   );
+
+   /**/
+   /* Function: 0x6f */
+   [todo] WERROR spoolss_RpcSetJobNamedProperty(
+   );
+
+   /**/
+   /* Function: 0x70 */
+   [todo] WERROR spoolss_RpcDeleteJobNamedProperty(
+   );
+
+   /**/
+   /* Function: 0x71 */
+   [todo] WERROR spoolss_RpcEnumJobNamedProperties(
+   );
 }
diff 

[SCM] CTDB repository - branch master updated - ctdb-2.0-43-g3cc596d

2013-01-07 Thread Amitay Isaacs
The branch, master has been updated
   via  3cc596d2b459d834f9785b3a98027e46431ff2b9 (commit)
   via  6a1d88a17321f7e1dc84b4823d5e7588516a6904 (commit)
   via  8adb255e62dbe60d1e983047acd7b9c941231d11 (commit)
   via  f6ce18d011dd9043b04256690d826deb2640cd89 (commit)
   via  c09aeaecad7d3232b1c07bab826b96818756f5e0 (commit)
   via  4dc08e37dec464c8785a2ddae15c7c69d3c81ac3 (commit)
   via  4c87e7cb3fa2cf2e034fa8454364e0a7fe0c8f81 (commit)
   via  e06476e07197b7327b8bdac9c0b2e7281798ffec (commit)
   via  bcd5f587aff3ba536cb0b5ef00d2d802352bae25 (commit)
   via  edda58a45915494027785608126b5da7c98fee85 (commit)
   via  5c820b2398a42af0e94bc524854a1ad144a63f7b (commit)
   via  98bd58a98d34ecca89c9042417d7527a18a5ecf9 (commit)
   via  d357d52dbd533444a4af6151d04ba119a1533068 (commit)
   via  20631f5f29859920844dd8f410e24917aabd3dfd (commit)
   via  06ad6b8a19f830472b0ed65cb52e7c3ea74ed1dc (commit)
  from  1a5410e8349cdb96fdc51aa5ecd4f5734f6798a5 (commit)

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


- Log -
commit 3cc596d2b459d834f9785b3a98027e46431ff2b9
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Jan 8 10:21:49 2013 +1100

tests/eventscripts: Ratchet down debug level for ctdb_takeover_tests

The default IP allocation algorithm used by ctdb_takeover_tests
changed from non-deterministic IPs to LCP2.  The latter generates
a lot more debug output.  ctdb_takeover_tests is used by the ctdb tool
stub to calculate IP address changes for failovers.  This resulted in
unexpected debug output that caused tests to fail.  Since eventscript
tests don't care how IP allocations are arrived at, the best solution
is to turn down the debug level.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 6a1d88a17321f7e1dc84b4823d5e7588516a6904
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Dec 14 17:12:01 2012 +1100

recoverd: Separate each IP allocation algorithm into its own function

This makes the code much more readable and maintainable.

As a side effect, fix a memory leak in LCP2.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 8adb255e62dbe60d1e983047acd7b9c941231d11
Author: Martin Schwenke mar...@meltin.net
Date:   Thu Dec 13 13:23:32 2012 +1100

recoverd: New function unassign_unsuitable_ips()

Move the code into a new function so it can be called from a number of
places.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit f6ce18d011dd9043b04256690d826deb2640cd89
Author: Martin Schwenke mar...@meltin.net
Date:   Thu Dec 13 12:15:32 2012 +1100

recoverd: Move failback retry loop into basic_failback() and lcp2_failback()

The retry loop is currently in ctdb_takeover_run_core().  Pushing it
into each function will make it possible to put each algorithm into a
separate top-level function.  This will make the code much clearer and
more maintainable.

Also keep associated test code compatible.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit c09aeaecad7d3232b1c07bab826b96818756f5e0
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Dec 11 15:49:17 2012 +1100

recoverd: Trying to failback more IPs no longer allocates unassigned IPs

Neither basic_failback() nor lcp2_failback() unassign IPs anymore, so
there's no point looping back that far.

Also fix a unit test that now fails because looping back to handle
unassigned IPs is no longer logged.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 4dc08e37dec464c8785a2ddae15c7c69d3c81ac3
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Dec 11 15:43:36 2012 +1100

recoverd: basic_failback() can call find_takeover_node() directly

Instead of unassigning, looping back and depending on
basic_allocate_unassigned.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 4c87e7cb3fa2cf2e034fa8454364e0a7fe0c8f81
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Dec 11 15:01:12 2012 +1100

recoverd: Don't do failback at all when deterministic IPs are in use

This seems to be the right thing to do instead of calling into the
failback code and continually skipping the release of an IP.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit e06476e07197b7327b8bdac9c0b2e7281798ffec
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Dec 14 17:10:41 2012 +1100

recoverd: Move the test for both 'DeterministicIPs' and 'NoIPFailback' set

If this is done earlier then some other logic can be improved.  Also,
this should be a warning since no error condition is set.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit bcd5f587aff3ba536cb0b5ef00d2d802352bae25
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Dec 14 17:10:05 2012 +1100


[SCM] Samba Shared Repository - branch master updated

2013-01-07 Thread Jeremy Allison
The branch, master has been updated
   via  eae01b0 samba-tool Add --service argument to samba-tool ntacl 
get/set
   via  cef5f46 pysmbd: Change to keyword based arguments
   via  4741cda scripting-provision: Set sysvol ACLs on the sysvol share
   via  0533905 scripting-ntacls: Optionally allow the service to be 
specified.
   via  813a3f0 pysmbd: Convert pysmbd to take an optional service to 
connect to
   via  5a3e915 smbd: Fix calls to create_conn_struct_cwd to be correctly 
indented.
   via  6c80cf7 smbd: Split create_conn_struct into a fn that does not 
change the working dir
  from  6a5afa2 spoolss: add stubs for new JobNamedProperty dcerpc calls.

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


- Log -
commit eae01b0d3daf5bae9edada73669e3af879b000bb
Author: Andrew Bartlett abart...@samba.org
Date:   Sat Dec 15 21:24:26 2012 +1100

samba-tool Add --service argument to samba-tool ntacl get/set

This also ensures a VFS connect is done to the correct service.

Andrew Bartlett

Reviewed-by: Jeremy Allison j...@samba.org

Autobuild-User(master): Jeremy Allison j...@samba.org
Autobuild-Date(master): Tue Jan  8 03:39:21 CET 2013 on sn-devel-104

commit cef5f466af80406d9a1ce0b37d1ed1d237d59be1
Author: Andrew Bartlett abart...@samba.org
Date:   Sat Dec 15 21:17:30 2012 +1100

pysmbd: Change to keyword based arguments

Reviewed-by: Jeremy Allison j...@samba.org

commit 4741cda95668bee184cd2760848924fa4ad1e2bc
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Dec 14 22:17:23 2012 +1100

scripting-provision: Set sysvol ACLs on the sysvol share

This allows us to correctly load any modules that have been specified
by the smb.conf for [sysvol] and issue a VFS connect operation which
may be required by some VFS modules.

Andrew Bartlett

Reviewed-by: Jeremy Allison j...@samba.org

commit 0533905c5df2c0de4f2714df3e29ad90b48b1892
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Dec 14 22:09:18 2012 +1100

scripting-ntacls: Optionally allow the service to be specified.

Providing a service allows a VFS connect to be issued on the correct
service, and so ensures that the correct modules are loaded rather
than just what is specified in [globals].

Andrew Bartlett

Reviewed-by: Jeremy Allison j...@samba.org

commit 813a3f0df91251dd7f920074ff8cd2b45bf48749
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Oct 10 13:48:27 2012 +1100

pysmbd: Convert pysmbd to take an optional service to connect to

This uses create_conn_struct to correctly call VFS_CONNECT(), but only
if a service has been specified.

Andrew Bartlett

Reviewed-by: Jeremy Allison j...@samba.org

commit 5a3e915d20bb11984c42081bf25ce09baa58e04e
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Jan 8 09:29:48 2013 +1100

smbd: Fix calls to create_conn_struct_cwd to be correctly indented.

These are whitespace changes only, left out of the previous commit to 
preserve clarity.

Andrew Bartlett.

Reviewed-by: Jeremy Allison j...@samba.org

commit 6c80cf747d75e648a1d88d477bcf476e6874c4b3
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Oct 10 13:47:49 2012 +1100

smbd: Split create_conn_struct into a fn that does not change the working 
dir

The python bindings do not want the current working directory changed
during operations, so we provide two functions, one providing the
original behaviour, and other providing the python bindings with just
the memory allocation and initilisation stuff.

Andrew Bartlett

Reviewed-by: Jeremy Allison j...@samba.org

---

Summary of changes:
 source3/printing/nt_printing.c |   42 ++--
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c  |   24 +-
 source3/smbd/msdfs.c   |   90 --
 source3/smbd/proto.h   |   16 +-
 source3/smbd/pysmbd.c  |  333 +++-
 source4/scripting/python/samba/netcmd/ntacl.py |   16 +-
 source4/scripting/python/samba/ntacls.py   |   12 +-
 .../scripting/python/samba/provision/__init__.py   |   37 ++-
 8 files changed, 336 insertions(+), 234 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 252fbb8..e09ee89 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -616,13 +616,13 @@ static uint32 get_correct_cversion(struct 
auth_session_info *session_info,
return -1;
}
 
-   nt_status = create_conn_struct(talloc_tos(),
-  server_event_context(),
-  

[SCM] CTDB repository - branch master updated - ctdb-2.0-44-g13a5944

2013-01-07 Thread Amitay Isaacs
The branch, master has been updated
   via  13a5944f8a27d43006acfffba76958693cae7702 (commit)
  from  3cc596d2b459d834f9785b3a98027e46431ff2b9 (commit)

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


- Log -
commit 13a5944f8a27d43006acfffba76958693cae7702
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Oct 12 16:12:38 2012 +1100

tests/simple: Add test to check recovery daemon IP verification

Also update ips_are_on_nodeglob() to handle negation.

Signed-off-by: Martin Schwenke mar...@meltin.net

---

Summary of changes:
 tests/scripts/integration.bash |   24 ++--
 tests/simple/60_recoverd_missing_ip.sh |  103 
 2 files changed, 121 insertions(+), 6 deletions(-)
 create mode 100755 tests/simple/60_recoverd_missing_ip.sh


Changeset truncated at 500 lines:

diff --git a/tests/scripts/integration.bash b/tests/scripts/integration.bash
index 07e764e..2e5fb37 100644
--- a/tests/scripts/integration.bash
+++ b/tests/scripts/integration.bash
@@ -438,8 +438,14 @@ wait_until_node_has_status ()
 
 # Useful for superficially testing IP failover.
 # IPs must be on nodes matching nodeglob.
+# If the first argument is '!' then the IPs must not be on nodes
+# matching nodeglob.
 ips_are_on_nodeglob ()
 {
+local negating=false
+if [ $1 = ! ] ; then
+   negating=true ; shift
+fi
 local nodeglob=$1 ; shift
 local ips=$*
 
@@ -447,17 +453,23 @@ ips_are_on_nodeglob ()
 
 all_ips_on_node 1
 
-while read ip pnn ; do
-   for check in $ips ; do
+for check in $ips ; do
+   while read ip pnn ; do
if [ $check = $ip ] ; then
case $pnn in
-   ($nodeglob) : ;;
-   (*) return 1  ;;
+   ($nodeglob) if $negating ; then return 1 ; fi ;;
+   (*) if ! $negating ; then return 1 ; fi  ;;
esac
ips=${ips/${ip}} # Remove from list
+   break
fi
-   done
-done $out # bashism to avoid problem setting variable in pipeline.
+   # If we're negating and we didn't see the address then it
+   # isn't hosted by anyone!
+   if $negating ; then
+   ips=${ips/${check}}
+   fi
+   done $out # bashism to avoid problem setting variable in pipeline.
+done
 
 ips=${ips// } # Remove any spaces.
 [ -z $ips ]
diff --git a/tests/simple/60_recoverd_missing_ip.sh 
b/tests/simple/60_recoverd_missing_ip.sh
new file mode 100755
index 000..fc12e4c
--- /dev/null
+++ b/tests/simple/60_recoverd_missing_ip.sh
@@ -0,0 +1,103 @@
+#!/bin/bash
+
+test_info()
+{
+cat EOF
+Verify that the reconvery daemon handles unhosted IPs properly.
+EOF
+}
+
+. ${TEST_SCRIPTS_DIR}/integration.bash
+
+ctdb_test_init $@
+
+set -e
+
+cluster_is_healthy
+
+# Reset configuration
+ctdb_restart_when_done
+
+select_test_node_and_ips
+
+echo Running test against node $test_node and IP $test_ip
+
+# Find the interface
+try_command_on_node $test_node $CTDB ip -v -Y | awk -F: -v ip=$test_ip '\$2 
== ip { print \$4 }'
+iface=$out
+
+if [ -z $TEST_LOCAL_DAEMONS ] ; then
+# Find the netmask
+try_command_on_node $test_node ip addr show to $test_ip
+mask=${out##*/}
+mask=${mask%% *}
+else
+mask=24
+fi
+
+echo $test_ip/$mask is on $iface
+
+echo Deleting IP $test_ip from all nodes
+try_command_on_node -v $test_node $CTDB delip -n all $test_ip
+
+wait_until_ips_are_on_nodeglob '!' $test_node $test_ip
+
+try_command_on_node -v all $CTDB ip
+
+my_exit_hook ()
+{
+if [ -z $TEST_LOCAL_DAEMONS ] ; then
+   onnode -q all $CTDB enablescript 10.interface
+fi
+}
+
+ctdb_test_exit_hook_add my_exit_hook
+
+if [ -z $TEST_LOCAL_DAEMONS ] ; then
+# Stop monitor events from bringing up the link status of an interface
+try_command_on_node $test_node $CTDB disablescript 10.interface
+fi
+
+# This effectively cancels any monitor event that is in progress and
+# runs a new one
+try_command_on_node $test_node $CTDB eventscript monitor
+
+echo Marking interface $iface down on node $test_node
+try_command_on_node $test_node $CTDB setifacelink $iface down
+
+try_command_on_node $test_node $CTDB clearlog recoverd
+
+echo Adding IP $test_ip to node $test_node
+try_command_on_node $test_node $CTDB addip $test_ip/$mask $iface
+
+# Give the recovery daemon enough time to start doing IP verification
+sleep_for 15
+
+try_command_on_node $test_node $CTDB getlog recoverd
+
+msg=Public IP '$test_ip' is not assigned and we could serve it
+
+echo $msg
+
+if grep $msg  $out ; then
+echo BAD: the recovery daemon noticed that the IP was unhosted
+exit 1
+else
+echo GOOD: the recovery daemon did not notice that the IP was unhosted
+fi
+
+try_command_on_node $test_node $CTDB clearlog recoverd
+
+echo Marking interface 

[SCM] CTDB repository - branch master updated - ctdb-2.0-52-g50abf59

2013-01-07 Thread Amitay Isaacs
The branch, master has been updated
   via  50abf597cefe6f8ea2a2ff7694bf84641344a9b1 (commit)
   via  e2aaa64925cca359c71520e01a18fc9461b0da4d (commit)
   via  03356fd5ae7a3ac35fde0289cbea7c71ecf07367 (commit)
   via  13e5e609b262847b607e7af7e0685f44e7cb8e36 (commit)
   via  8507303b525d20c74e8ec4e7c4f5f275945cd3b6 (commit)
   via  376015ba5ad6b7703ae9949a1d40a0c72dfaba0c (commit)
   via  740ea8ea5084149c8b552a01ee1c98c558b12384 (commit)
   via  b23c30253cc9eb274b895cac0f8c65245ba0a200 (commit)
  from  13a5944f8a27d43006acfffba76958693cae7702 (commit)

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


- Log -
commit 50abf597cefe6f8ea2a2ff7694bf84641344a9b1
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Jan 4 13:52:01 2013 +1100

scripts: Make script_log() use supplied message, stop logger from hanging

When using syslog any provided message arguments are ignored and not
passed to logger.  This means that logger blocks waiting on stdin.
That's bad.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit e2aaa64925cca359c71520e01a18fc9461b0da4d
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Jan 4 11:41:03 2013 +1100

scripts: Rework ctdb-crash-cleanup.sh so that it uses existing functions

This improves maintainability.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 03356fd5ae7a3ac35fde0289cbea7c71ecf07367
Author: Martin Schwenke mar...@meltin.net
Date:   Fri Jan 4 11:23:29 2013 +1100

scripts: Make drop_all_public_ips() more robust

Incorporate some of the logic from ctdb-crash-cleanup.sh that ensures
IPs are deleted even if they have the wrong netmask or are on the
wrong interface.

Factoring out some of the code will allow it to be used elsewhere.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 13e5e609b262847b607e7af7e0685f44e7cb8e36
Author: Martin Schwenke mar...@meltin.net
Date:   Thu Jan 3 16:02:52 2013 +1100

ctdbd: Default value for debug_hung_script should use ETCDIR

That is, it should use whatever was specified in ./configure and
should not hardcode /etc.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 8507303b525d20c74e8ec4e7c4f5f275945cd3b6
Author: Martin Schwenke mar...@meltin.net
Date:   Thu Jan 3 15:33:57 2013 +1100

scripts: debug-hung-script.sh doesn't need functions/loadconfig

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 376015ba5ad6b7703ae9949a1d40a0c72dfaba0c
Author: Martin Schwenke mar...@meltin.net
Date:   Thu Jan 3 15:33:10 2013 +1100

scripts: statd-callout should calculate CTDB_BASE if it is not set

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 740ea8ea5084149c8b552a01ee1c98c558b12384
Author: Martin Schwenke mar...@meltin.net
Date:   Thu Jan 3 15:26:12 2013 +1100

eventscripts: Each script should set CTDB_BASE if it is not set

This makes it easier to run the scripts externally.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit b23c30253cc9eb274b895cac0f8c65245ba0a200
Author: Martin Schwenke mar...@meltin.net
Date:   Thu Jan 3 15:07:07 2013 +1100

scripts: Move drop_all_public_ips() to the functions file

... so it can be improved and used elsewhere.

Signed-off-by: Martin Schwenke mar...@meltin.net

---

Summary of changes:
 config/ctdb-crash-cleanup.sh  |   49 +
 config/ctdb.init  |6 
 config/debug-hung-script.sh   |3 --
 config/events.d/00.ctdb   |3 ++
 config/events.d/01.reclock|3 ++
 config/events.d/10.interface  |3 ++
 config/events.d/11.natgw  |3 ++
 config/events.d/11.routing|3 ++
 config/events.d/13.per_ip_routing |3 ++
 config/events.d/20.multipathd |3 ++
 config/events.d/31.clamd  |3 ++
 config/events.d/40.fs_use |3 ++
 config/events.d/40.vsftpd |3 ++
 config/events.d/41.httpd  |3 ++
 config/events.d/49.winbind|3 ++
 config/events.d/50.samba  |3 ++
 config/events.d/60.ganesha|3 ++
 config/events.d/60.nfs|3 ++
 config/events.d/62.cnfs   |3 ++
 config/events.d/70.iscsi  |3 ++
 config/events.d/91.lvs|3 ++
 config/events.d/99.timeout|3 ++
 config/functions  |   37 +++-
 config/statd-callout  |5 +--
 server/ctdbd.c|2 +-
 25 files changed, 113 insertions(+), 46 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/ctdb-crash-cleanup.sh b/config/ctdb-crash-cleanup.sh
index e176518..f426056 100755
--- a/config/ctdb-crash-cleanup.sh
+++ b/config/ctdb-crash-cleanup.sh
@@ -4,41