[Samba] Samba4 alpha12 Home Directory?!

2010-08-03 Thread Daniel Müller
Dear all,


I tried to configure home directories in my samb4 conf.
I set in my globals:

template homedir = /home/%WORKGROUP%/%ACCOUNTNAME%
template shell= /bin/bash

I added the directory for administrator manually :
/home/MYWORKGROUP/administrator

Did an entry in smb.conf:

[homes]
   path=%H
   read only=no

This did not work, smbclient gave me:

[r...@node1 etc]# smbclient //localhost/homes -Uadministrator
Password for [TUEBINGEN\administrator]:
Connection to \\localhost\homes failed - NT_STATUS_BAD_NETWORK_NAME

Even when I set [home]
  path=/home/MYWORKGROUP/%U
  read only=no
It is the same result.

Any idea to make this  work?

Daniel


EDV Daniel Müller

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen 
Tel.: 07071/206-463, Fax: 07071/206-499
eMail: muel...@tropenklinik.de
Internet: www.tropenklinik.de 


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


Re: [Samba] getent acting unreliable with idmap_ad

2010-08-03 Thread Robert Grasso

  I just filled it up properly, but did not mention Kerberos 
 in any way in smb.conf
 
 Doh, that's what I have too.
 
 Any chance you could send me a copy of your smb.conf?
 

well, no problem, I am sure it is not a great piece of smb.conf, actually : 
here it is : it is the one for my desktop : I removed
the comments and our private names and IPs :

[global]
   netbios name = short
   workgroup = WG
   realm = WG.LAN
   server string = Samba Server - long_name
   hosts allow = 10.0. 127.
   smb ports = 445
   #printcap name = /etc/printcap
   printcap name = cups
   load printers = yes
printing = cups
cups options = raw
 log level = 1
 log file = /var/log/samba/%m.log
   max log size = 1
   security = ADS
password server = s1,s2
   encrypt passwords = yes
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   preferred master = no
name resolve order = wins bcast
wins server = IP1 IP2
   dns proxy = yes 
   idmap domains = ALLDOMAINS
   idmap config ALLDOMAINS:backend = ad
   idmap config ALLDOMAINS:default = yes
   idmap config ALLDOMAINS:schema_mode = sfu
   idmap config ALLDOMAINS:range = 500 - 2
   template homedir = /home/%U
   winbind use default domain = yes
   winbind separator = +
   winbind enum users = yes
   winbind enum groups = yes
   winbind nss info = template sfu
   winbind offline logon = true
   winbind refresh tickets = true

Some comments : 
- I used netbios name, as my desktop Unix name is longer than 15 characters - 
Windows or Samba did not like it ...
- we have two names for our AD domain - our winadmin did not solve this issue 
so far, thus I put one name as the workgroup and the
other name as the kerberos realm ...
- I let template homedir in smb.conf by sheer lazyness, with SFU I don't use 
it
- I used to set winbind offline logon and winbind refresh tickets when my 
Samba was unstable, they were tests - then, once I
found the true solution, lazyness again ...

Hope this helps
---
Robert GRASSO 
System Engineer

CEDRAT
15, Chemin de Malacher - Inovallée - 38246 MEYLAN Cedex - FRANCE 
Tel: +33 (0)4 76 90 50 45 Fax: +33 (0)4 76 90 16 09
mailto:robert.gra...@cedrat.com
---
Support service   : mailto:supp...@cedrat.com 
Commercial service : mailto:ced...@cedrat.com 
Web site  : http://www.cedrat.com 

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


[Samba] SePrintOperatorPrivilege

2010-08-03 Thread Frédéric SOSSON
Hi all,

I just wan to know if SePrintOperatorPrivilege command works only with
Samba PDC?

regards,


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

Re: [Samba] Samba4 alpha12 Home Directory?!

2010-08-03 Thread Francis Guslinski
Use:

[homes]
   path=/home
   read only=no

Then set ACL permissions in \\server on the share.

The user home directory you set in tool Active Directory Users and Groups
from administration tools pack.

Here works fine in my tests.

2010/8/3 Daniel Müller muel...@tropenklinik.de

 Dear all,


 I tried to configure home directories in my samb4 conf.
 I set in my globals:

 template homedir = /home/%WORKGROUP%/%ACCOUNTNAME%
 template shell= /bin/bash

 I added the directory for administrator manually :
 /home/MYWORKGROUP/administrator

 Did an entry in smb.conf:

 [homes]
path=%H
read only=no

 This did not work, smbclient gave me:

 [r...@node1 etc]# smbclient //localhost/homes -Uadministrator
 Password for [TUEBINGEN\administrator]:
 Connection to \\localhost\homes failed - NT_STATUS_BAD_NETWORK_NAME

 Even when I set [home]
  path=/home/MYWORKGROUP/%U
  read only=no
 It is the same result.

 Any idea to make this  work?

 Daniel


 EDV Daniel Müller

 Leitung EDV
 Tropenklinik Paul-Lechler-Krankenhaus
 Paul-Lechler-Str. 24
 72076 Tübingen
 Tel.: 07071/206-463, Fax: 07071/206-499
 eMail: muel...@tropenklinik.de
 Internet: www.tropenklinik.de


 --
 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] ldap ssl = off ??

2010-08-03 Thread Clark Johnston
*
*
ldap ssl = off

In the how to for setting up samba-ldap
http://www.howtoforge.com/centos-5.x-samba-domain-controller-with-ldap-backend-p2
*
*
the author writes that you need

ldap ssl = off*

*for samba 3.x

am I interpreting this incorrectly?
I interpreted 'ldap ssl = off' as being that the communication from the
samba server to ldap server was not encrypted or not using tls and has
nothing to do with the communication with client computers in the domain.
Is this a change in the 3.x versions which requires that you explicitly
state you are not using ssl/tls.
*
*
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] ldap ssl = off ??

2010-08-03 Thread Norberto Bensa
I'm sure that setting is there only to simplify the how to

El 03/08/2010 18:20, Clark Johnston clarkhor...@gmail.com escribió:

*
*
ldap ssl = off

In the how to for setting up samba-ldap
http://www.howtoforge.com/centos-5.x-samba-domain-controller-with-ldap-backend-p2
*
*
the author writes that you need

ldap ssl = off*

*for samba 3.x

am I interpreting this incorrectly?
I interpreted 'ldap ssl = off' as being that the communication from the
samba server to ldap server was not encrypted or not using tls and has
nothing to do with the communication with client computers in the domain.
Is this a change in the 3.x versions which requires that you explicitly
state you are not using ssl/tls.
*
*
--
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] Error: Incorrect password length

2010-08-03 Thread Karotu Tannang
Hi,

I just upgraded my server to support Windows 7 and so installed Samba
3.5.4 from 3.2.5. OS is Debian Lenny.
Now my Windows XP clients cannot join the Domain.

When joining the Domain, I get a wrong password error on Windows. In
my samba logs it shows the following:

[2010/08/03 12:10:19.681501,  0] lib/util_sock.c:1432(get_peer_addr_internal)
  getpeername failed. Error was Transport endpoint is not connected
[2010/08/03 12:10:19.681859,  0] lib/util_sock.c:675(write_data)
[2010/08/03 12:10:19.681931,  0] lib/util_sock.c:1432(get_peer_addr_internal)
  getpeername failed. Error was Transport endpoint is not connected
  write_data: write failure in writing to client 0.0.0.0. Error
Connection reset by peer
[2010/08/03 12:10:19.682030,  0] smbd/process.c:79(srv_send_smb)
  Error writing 4 bytes to client. -1. (Transport endpoint is not connected)
[2010/08/03 12:10:19.987801,  0]
../libcli/auth/smbencrypt.c:589(decode_pw_buffer)
  decode_pw_buffer: incorrect password length (1720729972).
[2010/08/03 12:10:19.987986,  0]
../libcli/auth/smbencrypt.c:590(decode_pw_buffer)
  decode_pw_buffer: check that 'encrypt passwords = yes'

My smb.conf is --

[global]
workgroup = LMD
netbios name = LAND
force user = root
security = user
local master = yes
domain logons = yes
encrypt passwords = yes
interfaces = eth0
log level = 1
passdb backend = smbpasswd
log file = /var/log/samba/mainlog
logon drive = P:
logon script = logon.bat
logon home = \\LAND\%U
logon path =
hide files = /desktop.ini/
os level = 99
preferred master = yes
wins support = yes

#Automatically add them users/machines
add machine script = /usr/sbin/useradd -d /dev/null -g machines -c
'Machine Account' -s /bin/false '%u'
name resolve order = wins lmhosts hosts bcast

[homes]
read only = no
create mask = 0600
writable = yes
directory mask = 0700

[homes_ac]
path = /home
writable = yes
browseable = no

[netlogon]
path = /usr/netlogon
read only = yes
[mi_user]
#The other required DATA to be shared from /data
path = /home/data/mi_user
writable = yes
public = yes

[gdocs]
#G: drive
path = /home/data/gdocs 
writable = yes
public = yes

[linfo]
# H: drive
path = /home/data/linfo
writable = yes
public = yes

[mapba]
#K: drive
path = /home/data/mapba
writable = yes
public = yes

[ccad55]
#L: drive
path = /home/data/ccad55
writable = yes
public = yes

[qadocs]
#Q: drive
path = /home/data/qadocs
writable = yes
public = yes

[scripts]
#DIR for Scripts for pushing proxy and lockdown IE
path = /home/data/scripts
writable = no
public = yes
browseable = no
guest ok = yes


Maybe I missed out something? I checked a lot of documents online but
found only a few. Is it possible this could be a bug and that maybe a
developer is required to test this?

Even /etc/init.d/samba stop does not completely kills all smbd and
nmbd.. is this normal?

Look forward to hearing from any suggestions if there is any way I
could use it. Otherwise.. 'make revert' to 3.2.5.

Kind regards,

Karotu
-- 
--
Karotu Tannang
Nauoi IT Services
Behind BOK, Betio / PO Box 46, Bairiki
Tarawa, KIRIBATI
Office Phone: + 686 25483 / Mobile: +686 94038
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Error: Incorrect password length

2010-08-03 Thread Jax
Fuck you yellow scum. What the fuck joke domain KI is? :D
Another fucking chinese scum country?
God i wish someone would nuke whole asia...


On Wed, Aug 4, 2010 at 12:39 AM, Karotu Tannang kar...@nauoi.com.ki wrote:
 Hi,

 I just upgraded my server to support Windows 7 and so installed Samba
 3.5.4 from 3.2.5. OS is Debian Lenny.
 Now my Windows XP clients cannot join the Domain.

 When joining the Domain, I get a wrong password error on Windows. In
 my samba logs it shows the following:

 [2010/08/03 12:10:19.681501,  0] lib/util_sock.c:1432(get_peer_addr_internal)
  getpeername failed. Error was Transport endpoint is not connected
 [2010/08/03 12:10:19.681859,  0] lib/util_sock.c:675(write_data)
 [2010/08/03 12:10:19.681931,  0] lib/util_sock.c:1432(get_peer_addr_internal)
  getpeername failed. Error was Transport endpoint is not connected
  write_data: write failure in writing to client 0.0.0.0. Error
 Connection reset by peer
 [2010/08/03 12:10:19.682030,  0] smbd/process.c:79(srv_send_smb)
  Error writing 4 bytes to client. -1. (Transport endpoint is not connected)
 [2010/08/03 12:10:19.987801,  0]
 ../libcli/auth/smbencrypt.c:589(decode_pw_buffer)
  decode_pw_buffer: incorrect password length (1720729972).
 [2010/08/03 12:10:19.987986,  0]
 ../libcli/auth/smbencrypt.c:590(decode_pw_buffer)
  decode_pw_buffer: check that 'encrypt passwords = yes'

 My smb.conf is --

 [global]
        workgroup = LMD
        netbios name = LAND
        force user = root
        security = user
        local master = yes
        domain logons = yes
        encrypt passwords = yes
        interfaces = eth0
        log level = 1
        passdb backend = smbpasswd
        log file = /var/log/samba/mainlog
        logon drive = P:
        logon script = logon.bat
        logon home = \\LAND\%U
        logon path =
        hide files = /desktop.ini/
        os level = 99
        preferred master = yes
        wins support = yes

        #Automatically add them users/machines
        add machine script = /usr/sbin/useradd -d /dev/null -g machines -c
 'Machine Account' -s /bin/false '%u'
        name resolve order = wins lmhosts hosts bcast

 [homes]
        read only = no
        create mask = 0600
        writable = yes
        directory mask = 0700

 [homes_ac]
        path = /home
        writable = yes
        browseable = no

 [netlogon]
        path = /usr/netlogon
        read only = yes
 [mi_user]
        #The other required DATA to be shared from /data
        path = /home/data/mi_user
        writable = yes
        public = yes

 [gdocs]
        #G: drive
        path = /home/data/gdocs
        writable = yes
        public = yes

 [linfo]
        # H: drive
        path = /home/data/linfo
        writable = yes
        public = yes

 [mapba]
        #K: drive
        path = /home/data/mapba
        writable = yes
        public = yes

 [ccad55]
        #L: drive
        path = /home/data/ccad55
        writable = yes
        public = yes

 [qadocs]
        #Q: drive
        path = /home/data/qadocs
        writable = yes
        public = yes

 [scripts]
        #DIR for Scripts for pushing proxy and lockdown IE
        path = /home/data/scripts
        writable = no
        public = yes
        browseable = no
        guest ok = yes


 Maybe I missed out something? I checked a lot of documents online but
 found only a few. Is it possible this could be a bug and that maybe a
 developer is required to test this?

 Even /etc/init.d/samba stop does not completely kills all smbd and
 nmbd.. is this normal?

 Look forward to hearing from any suggestions if there is any way I
 could use it. Otherwise.. 'make revert' to 3.2.5.

 Kind regards,

 Karotu
 --
 --
 Karotu Tannang
 Nauoi IT Services
 Behind BOK, Betio / PO Box 46, Bairiki
 Tarawa, KIRIBATI
 Office Phone: + 686 25483 / Mobile: +686 94038
 --
 To unsubscribe from this list go to the following URL and read the
 instructions:  https://lists.samba.org/mailman/options/samba

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


Re: [Samba] ldap ssl = off ??

2010-08-03 Thread Grant
If you don't have that then you need the SSL certs fir the LDAP server on your 
samba box.
It's a lot easier to debug initially with it off...

On Aug 3, 2010, at 3:18 PM, Norberto Bensa nbe...@flacso.org.ar wrote:

 I'm sure that setting is there only to simplify the how to
 
 El 03/08/2010 18:20, Clark Johnston clarkhor...@gmail.com escribió:
 
 *
 *
 ldap ssl = off
 
 In the how to for setting up samba-ldap
 http://www.howtoforge.com/centos-5.x-samba-domain-controller-with-ldap-backend-p2
 *
 *
 the author writes that you need
 
 ldap ssl = off*
 
 *for samba 3.x
 
 am I interpreting this incorrectly?
 I interpreted 'ldap ssl = off' as being that the communication from the
 samba server to ldap server was not encrypted or not using tls and has
 nothing to do with the communication with client computers in the domain.
 Is this a change in the 3.x versions which requires that you explicitly
 state you are not using ssl/tls.
 *
 *
 --
 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] Strange Win7 message

2010-08-03 Thread Martin Hochreiter

 Hi!

I don't know if this is Samba related, but I just try - maybe someone 
could lead me in the right direction:


I am using Samba 3.5.4 and I just changed all my workstations in my 
domain to Windows 7.
On one worksstation it is not possible to log on with one certain user 
(all the others a working).

b.t.w. We use openldap as database for samba.

If you logon with that user, the roaming profile is loaded and suddenly 
win7 stops with
The local session manager fails to start and a message that a cache or 
something is to
small for the value. The user login is cancelled ... it does not matter 
if i make it to a local stored profile.


Can somebody give me a hint?

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


Build status as of Tue Aug 3 06:00:02 2010

2010-08-03 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2010-08-02 
00:00:03.0 -0600
+++ /home/build/master/cache/broken_results.txt 2010-08-03 00:00:03.0 
-0600
@@ -1,9 +1,10 @@
-Build status as of Mon Aug  2 06:00:01 2010
+Build status as of Tue Aug  3 06:00:02 2010
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   32 9  0 
+ccache   32 1  0 
+ccache-maint 20 3  0 
 ldb  32 10 0 
 libreplace   32 11 0 
 lorikeet 0  0  0 
@@ -13,10 +14,10 @@
 samba-docs   0  0  0 
 samba-web0  0  0 
 samba_3_current 32 32 4 
-samba_3_master 32 32 6 
+samba_3_master 32 32 4 
 samba_3_next 32 32 6 
 samba_4_0_test 32 32 0 
-samba_4_0_waf 36 34 1 
+samba_4_0_waf 36 33 1 
 talloc   32 7  0 
 tdb  30 8  0 
 


[SCM] CTDB repository - branch 1.0.112 updated - ctdb-1.0.111-128-g46b0933

2010-08-03 Thread Ronnie Sahlberg
The branch, 1.0.112 has been updated
   via  46b093324c01c56a12fdde0b47980ee57c33c00e (commit)
   via  5e60aad0e19cabb29c3be191698e10049da151c7 (commit)
   via  31f510cceb124e89811c58d29fae336982c2e1a4 (commit)
  from  20579b46300517d11f4c12c640aa365e0cfd0658 (commit)

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


- Log -
commit 46b093324c01c56a12fdde0b47980ee57c33c00e
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Aug 3 15:42:25 2010 +1000

New version 1.0.112-31

 - Retry the vacuum abort code.
 - Add codestyle doc
 - When rebalancing ip addresses, increase number of iterations from 5
 - When using deterministic ips, dont force ips without home address
   to move back.

commit 5e60aad0e19cabb29c3be191698e10049da151c7
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Aug 3 14:12:17 2010 +1000

For deterministic IPs, check if the designated node can host the ip before
we try to reassign it back to the home node.

If it can not, of if it is unknown, just leave the ip where it is.

This reduces the amount of flapping an ip address with no home node
does during recoveries.

commit 31f510cceb124e89811c58d29fae336982c2e1a4
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Aug 3 13:34:27 2010 +1000

When trying to re-balance the ip assignment and shuffle ips from
nodes with many addresses to nodes with few addresses,
loop up to num_ips+5 times instead of only 5 times.

When we have very many public ips per node, we might need to loop more than
5 times or else we will exit without reaching optimal balance.

---

Summary of changes:
 packaging/RPM/ctdb.spec.in |8 +++-
 server/ctdb_takeover.c |   21 -
 2 files changed, 23 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index 4017e24..dbe626a 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -5,7 +5,7 @@ Vendor: Samba Team
 Packager: Samba Team sa...@samba.org
 Name: ctdb
 Version: 1.0.112
-Release: 30
+Release: 31
 Epoch: 0
 License: GNU GPL version 3
 Group: System Environment/Daemons
@@ -125,6 +125,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_docdir}/ctdb/tests/bin/ctdb_transaction
 
 %changelog
+* Tue Aug 3 2010 : Version 1.0.112-31
+ - Retry the vacuum abort code.
+ - Add codestyle doc
+ - When rebalancing ip addresses, increase number of iterations from 5
+ - When using deterministic ips, dont force ips without home address
+   to move back.
 * Mon Jul 26 2010 : Version 1.0.112-30
  - last minute fix for crash bug in the recent vacuum abort code.
 
diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c
index 6c771e0..d0de683 100644
--- a/server/ctdb_takeover.c
+++ b/server/ctdb_takeover.c
@@ -737,7 +737,7 @@ create_merged_ip_list(struct ctdb_context *ctdb)
  */
 int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap)
 {
-   int i, num_healthy, retries;
+   int i, num_healthy, retries, num_ips;
struct ctdb_public_ip ip;
struct ctdb_public_ipv4 ipv4;
uint32_t mask;
@@ -782,6 +782,12 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct 
ctdb_node_map *nodemap)
*/
all_ips = create_merged_ip_list(ctdb);
 
+   /* Count how many ips we have */
+   num_ips = 0;
+   for (tmp_ip=all_ips;tmp_ip;tmp_ip=tmp_ip-next) {
+   num_ips++;
+   }
+
/* If we want deterministic ip allocations, i.e. that the ip addresses
   will always be allocated the same way for a specific set of
   available/unavailable nodes.
@@ -789,7 +795,12 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct 
ctdb_node_map *nodemap)
if (1 == ctdb-tunable.deterministic_public_ips) {  
DEBUG(DEBUG_NOTICE,(Deterministic IPs enabled. Resetting all 
ip allocations\n));
for (i=0,tmp_ip=all_ips;tmp_ip;tmp_ip=tmp_ip-next,i++) {
-   tmp_ip-pnn = i%nodemap-num;
+   int tmp_pnn;
+
+   tmp_pnn = i%nodemap-num;
+   if (can_node_serve_ip(ctdb, tmp_pnn, tmp_ip) == 0) {
+   tmp_ip-pnn = tmp_pnn;
+   }
}
}
 
@@ -915,11 +926,11 @@ try_again:
/* if the spread between the smallest and largest coverage by
   a node is =2 we steal one of the ips from the node with
   most coverage to even things out a bit.
-  try to do this at most 5 times  since we dont want to spend
-  too much time balancing the ip coverage.
+  try to do this a limited number of times since we dont
+   

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

2010-08-03 Thread Andreas Schneider
The branch, v3-6-test has been updated
   via  b136cfd... idl: Fixed a possible crash bug. (cherry picked from 
commit b6e9d8d406974ec2f4593fd0147113fe86b883f9)
   via  bf41bc2... s3-spoolss: Fixed a segfault if a value has no data. 
(cherry picked from commit d3fff4590420a3b2d1858e6c8dbaf4df93447a46)
   via  1be4066... s3-spoolss: Move some debug message to a higher level. 
(cherry picked from commit 307bd439d7f5df828923189c02fcbe30124d1e01)
   via  a1c3a82... s3-spoolss: Fixed some C++ build warnings. (cherry 
picked from commit 4412bafa4460bbafe2170f980e8ce88937422529)
   via  d4e29ee... s3-spoolss: Use a stackframe to allocat memory.
  from  3064482... s4-smbtorture: remove another old and now invalid s3 
special case during spoolss testing.

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


- Log -
commit b136cfd93512af6a69eaa80ffd8000d18d3a6254
Author: Andreas Schneider a...@samba.org
Date:   Mon Aug 2 18:32:40 2010 +0200

idl: Fixed a possible crash bug.
(cherry picked from commit b6e9d8d406974ec2f4593fd0147113fe86b883f9)

commit bf41bc2b4250e1c455ea05383c0f40026d31389a
Author: Andreas Schneider a...@samba.org
Date:   Mon Aug 2 13:49:59 2010 +0200

s3-spoolss: Fixed a segfault if a value has no data.
(cherry picked from commit d3fff4590420a3b2d1858e6c8dbaf4df93447a46)

commit 1be40662b854b9cc9bb6f125961727b474da2a8e
Author: Andreas Schneider a...@samba.org
Date:   Mon Aug 2 13:21:47 2010 +0200

s3-spoolss: Move some debug message to a higher level.
(cherry picked from commit 307bd439d7f5df828923189c02fcbe30124d1e01)

commit a1c3a82a576f9e8539532328c8ca380fcc880704
Author: Andreas Schneider a...@samba.org
Date:   Mon Aug 2 12:38:57 2010 +0200

s3-spoolss: Fixed some C++ build warnings.
(cherry picked from commit 4412bafa4460bbafe2170f980e8ce88937422529)

commit d4e29ee9235ec59457dcfbd5878946bf40ab4ff3
Author: Andreas Schneider a...@samba.org
Date:   Mon Aug 2 12:09:03 2010 +0200

s3-spoolss: Use a stackframe to allocat memory.

This is faster and should be more secure to use if something goes wrong.
(cherry picked from commit 772fbce9ffd7ec9de7d33e29d96852dce7f35c43)

---

Summary of changes:
 librpc/idl/winreg.idl |2 +-
 source3/rpc_server/srv_spoolss_nt.c   |2 +-
 source3/rpc_server/srv_spoolss_util.c |   75 +
 3 files changed, 41 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/winreg.idl b/librpc/idl/winreg.idl
index c3e5279..48fddb7 100644
--- a/librpc/idl/winreg.idl
+++ b/librpc/idl/winreg.idl
@@ -188,7 +188,7 @@ import lsa.idl, security.idl, misc.idl;
[in]uint32 enum_index,
[in,out,ref]winreg_ValNameBuf *name,
[in,out,unique] winreg_Type *type,
-   [in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
+   [in,out,unique,size_is(size ? *size : 0),length_is(length ? 
*length : 0),range(0,0x400)] uint8 *value,
[in,out,unique] uint32 *size,
[in,out,unique] uint32 *length
);
diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index 1d9632f..b62a7c0 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -528,7 +528,7 @@ static bool set_printer_hnd_name(TALLOC_CTX *mem_ctx,
sname,
info2);
if ( !W_ERROR_IS_OK(result) ) {
-   DEBUG(0,(set_printer_hnd_name: failed to lookup 
printer [%s] -- result [%s]\n,
+   DEBUG(2,(set_printer_hnd_name: failed to lookup 
printer [%s] -- result [%s]\n,
 sname, win_errstr(result)));
continue;
}
diff --git a/source3/rpc_server/srv_spoolss_util.c 
b/source3/rpc_server/srv_spoolss_util.c
index 768171a..819a1dd 100644
--- a/source3/rpc_server/srv_spoolss_util.c
+++ b/source3/rpc_server/srv_spoolss_util.c
@@ -397,7 +397,7 @@ static WERROR winreg_printer_enumvalues(TALLOC_CTX *mem_ctx,
WERROR result = WERR_OK;
NTSTATUS status;
 
-   tmp_ctx = talloc_new(mem_ctx);
+   tmp_ctx = talloc_stackframe();
if (tmp_ctx == NULL) {
return WERR_NOMEM;
}
@@ -443,7 +443,7 @@ static WERROR winreg_printer_enumvalues(TALLOC_CTX *mem_ctx,
struct spoolss_PrinterEnumValues val;
struct winreg_ValNameBuf name_buf;
enum winreg_Type type = REG_NONE;
-   uint8_t *data = NULL;
+   uint8_t *data;
uint32_t data_size;
uint32_t length;
char n = '\0';;
@@ -453,7 +453,10 @@ static WERROR 

[SCM] Samba Shared Repository - branch master updated

2010-08-03 Thread Anatoliy Atanasov
The branch, master has been updated
   via  bf5d88e... s4/vampire: update dNSHostName for the Server object
  from  f827904... s4-schema: More verbose error log when subClassOf is not 
found in schema

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


- Log -
commit bf5d88ec1caf47d9b0009396811d6bff5bfecc31
Author: Anatoliy Atanasov anatoliy.atana...@postpath.com
Date:   Mon Aug 2 16:47:38 2010 +0300

s4/vampire: update dNSHostName for the Server object

---

Summary of changes:
 source4/libnet/libnet_vampire.c |   62 ++-
 1 files changed, 61 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index b85869e..5a5f126 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -40,6 +40,7 @@
 #include param/param.h
 #include param/provision.h
 #include libcli/security/dom_sid.h
+#include dsdb/common/util.h
 
 /* 
 List of tasks vampire.py must perform:
@@ -88,6 +89,7 @@ struct libnet_vampire_cb_state {
struct tevent_context *event_ctx;
unsigned total_objects;
char *last_partition;
+   const char *server_dn_str;
 };
 
 /* Caller is expected to keep supplied pointers around for the lifetime of the 
structure */
@@ -152,6 +154,7 @@ NTSTATUS libnet_vampire_cb_prepare_db(void *private_data,
s-ldb = talloc_steal(s, result.samdb);
s-lp_ctx = talloc_steal(s, result.lp_ctx);
s-provision_schema = dsdb_get_schema(s-ldb, s);
+   s-server_dn_str = talloc_steal(s, p-dest_dsa-server_dn_str);
 
/* wrap the entire vapire operation in a transaction.  This
   isn't just cosmetic - we use this to ensure that linked
@@ -701,6 +704,55 @@ NTSTATUS libnet_vampire_cb_store_chunk(void *private_data,
return NT_STATUS_OK;
 }
 
+static NTSTATUS update_dnshostname_for_server(TALLOC_CTX *mem_ctx,
+ struct ldb_context *ldb,
+ const char *server_dn_str,
+ const char *netbios_name,
+ const char *realm)
+{
+   int ret;
+   struct ldb_message *msg;
+   struct ldb_message_element *el;
+   struct ldb_dn *server_dn;
+   const char *dNSHostName = strlower_talloc(mem_ctx,
+ talloc_asprintf(mem_ctx,
+ %s.%s,
+ netbios_name,
+ realm));
+   msg = ldb_msg_new(mem_ctx);
+   if (msg == NULL) {
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   server_dn = ldb_dn_new(mem_ctx, ldb, server_dn_str);
+   if (!server_dn) {
+   return NT_STATUS_INTERNAL_ERROR;
+   }
+
+   msg-dn = server_dn;
+   ret = ldb_msg_add_empty(msg, dNSHostName, LDB_FLAG_MOD_ADD, el);
+   if (ret != LDB_SUCCESS) {
+   return NT_STATUS_INTERNAL_ERROR;
+   }
+
+   ret = ldb_msg_add_steal_string(msg,
+  dNSHostName,
+  talloc_asprintf(el-values, %s, 
dNSHostName));
+   if (ret != LDB_SUCCESS) {
+   return NT_STATUS_INTERNAL_ERROR;
+   }
+
+   ret = dsdb_modify(ldb, msg, DSDB_MODIFY_PERMISSIVE);
+   if (ret != LDB_SUCCESS) {
+   DEBUG(0,(__location__ : Failed to add dnsHostName to the 
Server object: %s\n,
+ldb_errstring(ldb)));
+   return NT_STATUS_INTERNAL_ERROR;
+   }
+
+   return NT_STATUS_OK;
+}
+
+
 NTSTATUS libnet_Vampire(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, 
struct libnet_Vampire *r)
 {
@@ -836,7 +888,15 @@ NTSTATUS libnet_Vampire(struct libnet_context *ctx, 
TALLOC_CTX *mem_ctx,
talloc_free(s);
return NT_STATUS_INTERNAL_DB_ERROR;
}
-
+   /* during dcpromo the 2nd computer adds dNSHostName attribute to his 
Server object
+* the attribute appears on the original DC after replication
+*/
+   status = update_dnshostname_for_server(s, s-ldb, s-server_dn_str, 
s-netbios_name, s-realm);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf(Failed to update dNSHostName on Server object - %s\n, 
nt_errstr(status));
+   talloc_free(s);
+   return status;
+   }
/* prepare the transaction - this prepares to commit all the changes in
   the ldb from the whole vampire.  Note that this 
   triggers the writing of the linked attribute backlinks.


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-08-03 Thread Günther Deschner
The branch, master has been updated
   via  64b26af... s3-dcerpc: fix some uninitialized variables build 
warnings.
   via  bf19a52... s3-spoolss: fix type-punned pointer build warning.
   via  743a2de... s3-spoolss: fix uninitialized variable build warning.
   via  c530aa3... s3-printing: make sure to set NTSTATUS code before 
checking it.
  from  bf5d88e... s4/vampire: update dNSHostName for the Server object

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


- Log -
commit 64b26affe0afa2999130cdd4f1d521dccd877c9c
Author: Günther Deschner g...@samba.org
Date:   Tue Aug 3 15:55:20 2010 +0200

s3-dcerpc: fix some uninitialized variables build warnings.

Guenther

commit bf19a5228aa582e35d1447cb918a1f66bfdf8b2d
Author: Günther Deschner g...@samba.org
Date:   Tue Aug 3 15:13:57 2010 +0200

s3-spoolss: fix type-punned pointer build warning.

Guenther

commit 743a2dedf42c2aa3e9e6caee92e3e9581ae56dce
Author: Günther Deschner g...@samba.org
Date:   Tue Aug 3 14:51:27 2010 +0200

s3-spoolss: fix uninitialized variable build warning.

Andreas, please check.

Guenther

commit c530aa33cd9ac75bdd79754a2886bff54115800a
Author: Günther Deschner g...@samba.org
Date:   Tue Aug 3 13:18:01 2010 +0200

s3-printing: make sure to set NTSTATUS code before checking it.

Andreas, please check.

Guenther

---

Summary of changes:
 source3/librpc/rpc/dcerpc_spnego.c |4 ++--
 source3/printing/nt_printing_migrate.c |   10 +-
 source3/rpc_client/cli_pipe.c  |2 +-
 source3/rpc_server/srv_pipe.c  |2 +-
 source3/rpc_server/srv_spoolss_nt.c|2 +-
 source3/rpc_server/srv_spoolss_util.c  |4 +++-
 6 files changed, 13 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/librpc/rpc/dcerpc_spnego.c 
b/source3/librpc/rpc/dcerpc_spnego.c
index a0832ce..5627a0d 100644
--- a/source3/librpc/rpc/dcerpc_spnego.c
+++ b/source3/librpc/rpc/dcerpc_spnego.c
@@ -68,7 +68,7 @@ NTSTATUS spnego_gssapi_init_client(TALLOC_CTX *mem_ctx,
   uint32_t add_gss_c_flags,
   struct spnego_context **spnego_ctx)
 {
-   struct spnego_context *sp_ctx;
+   struct spnego_context *sp_ctx = NULL;
NTSTATUS status;
 
status = spnego_context_init(mem_ctx,
@@ -97,7 +97,7 @@ NTSTATUS spnego_ntlmssp_init_client(TALLOC_CTX *mem_ctx,
const char *password,
struct spnego_context **spnego_ctx)
 {
-   struct spnego_context *sp_ctx;
+   struct spnego_context *sp_ctx = NULL;
NTSTATUS status;
 
status = spnego_context_init(mem_ctx,
diff --git a/source3/printing/nt_printing_migrate.c 
b/source3/printing/nt_printing_migrate.c
index 624d245..1ee5578 100644
--- a/source3/printing/nt_printing_migrate.c
+++ b/source3/printing/nt_printing_migrate.c
@@ -536,11 +536,11 @@ static NTSTATUS migrate_internal(TALLOC_CTX *mem_ctx,
}
 
if (strncmp((const char *) kbuf.dptr, PRINTERS_PREFIX, 
strlen(PRINTERS_PREFIX)) == 0) {
-   migrate_printer(mem_ctx,
-   pipe_hnd,
-   (const char *) kbuf.dptr + 
strlen(PRINTERS_PREFIX),
-   dbuf.dptr,
-   dbuf.dsize);
+   status = migrate_printer(mem_ctx,
+pipe_hnd,
+(const char *) kbuf.dptr + 
strlen(PRINTERS_PREFIX),
+dbuf.dptr,
+dbuf.dsize);
SAFE_FREE(dbuf.dptr);
if (!NT_STATUS_IS_OK(status)) {
tdb_close(tdb);
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 2bb9aad..b38000e 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2746,7 +2746,7 @@ NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
   struct rpc_pipe_client **presult)
 {
struct rpc_pipe_client *result;
-   struct pipe_auth_data *auth;
+   struct pipe_auth_data *auth = NULL;
enum dcerpc_AuthType auth_type = DCERPC_AUTH_TYPE_NTLMSSP;
NTSTATUS status;
 
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 899073b..436e5be 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -205,7 +205,7 @@ static NTSTATUS create_next_packet(TALLOC_CTX *mem_ctx,
 
 bool create_next_pdu(struct pipes_struct *p)
 {
-   size_t pdu_size;
+   size_t pdu_size = 0;
  

[SCM] Samba Shared Repository - branch master updated

2010-08-03 Thread Volker Lendecke
The branch, master has been updated
   via  72cd5bc... make scannedonly notify the scanner if no .scanned: file 
was found during rename
  from  64b26af... s3-dcerpc: fix some uninitialized variables build 
warnings.

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


- Log -
commit 72cd5bcd58a2c85ba7257dfcfca61af3ddc1f590
Author: olivier oliv...@virtscano.fakenet
Date:   Tue Aug 3 00:20:11 2010 +0200

make scannedonly notify the scanner if no .scanned: file was found during 
rename

---

Summary of changes:
 source3/modules/vfs_scannedonly.c |   23 ---
 1 files changed, 16 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_scannedonly.c 
b/source3/modules/vfs_scannedonly.c
index 679ecc8..b76bef4 100644
--- a/source3/modules/vfs_scannedonly.c
+++ b/source3/modules/vfs_scannedonly.c
@@ -1,7 +1,7 @@
 /*
  * scannedonly VFS module for Samba 3.5
  *
- * Copyright 2007,2008,2009 (C) Olivier Sessink
+ * Copyright 2007,2008,2009,2010 (C) Olivier Sessink
  *
  * 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
@@ -766,6 +766,8 @@ static int scannedonly_rename(vfs_handle_struct * handle,
struct smb_filename *smb_fname_src_tmp = NULL;
struct smb_filename *smb_fname_dst_tmp = NULL;
char *cachefile_src, *cachefile_dst;
+   bool needscandst=false;
+   int ret;
TALLOC_CTX *ctx = talloc_tos();
 
/* Setup temporary smb_filename structs. */
@@ -777,19 +779,26 @@ static int scannedonly_rename(vfs_handle_struct * handle,
ctx,
smb_fname_dst-base_name,
STRUCTSCANO(handle-data)-p_scanned);
-
create_synthetic_smb_fname(ctx, cachefile_src,NULL,NULL,
   smb_fname_src_tmp);
create_synthetic_smb_fname(ctx, cachefile_dst,NULL,NULL,
   smb_fname_dst_tmp);
 
-   if (SMB_VFS_NEXT_RENAME(handle, smb_fname_src_tmp, smb_fname_dst_tmp)
-   != 0) {
+   ret = SMB_VFS_NEXT_RENAME(handle, smb_fname_src_tmp, smb_fname_dst_tmp);
+   if (ret == ENOENT) {
+   needscandst=true;
+   } else if (ret != 0) {
DEBUG(SCANNEDONLY_DEBUG,
- (failed to rename %s into %s\n, cachefile_src,
-  cachefile_dst));
+ (failed to rename %s into %s error %d: %s\n, 
cachefile_src,
+  cachefile_dst, ret, strerror(ret)));
+   needscandst=true;
}
-   return SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst);
+   ret = SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst);
+   if (ret == 0  needscandst) {
+   notify_scanner(handle, smb_fname_dst-base_name);
+   flush_sendbuffer(handle);
+   }
+   return ret;
 }
 
 static int scannedonly_unlink(vfs_handle_struct * handle,


-- 
Samba Shared Repository


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

2010-08-03 Thread Volker Lendecke
The branch, v3-6-test has been updated
   via  4c3f51b... make scannedonly notify the scanner if no .scanned: file 
was found during rename
  from  b136cfd... idl: Fixed a possible crash bug. (cherry picked from 
commit b6e9d8d406974ec2f4593fd0147113fe86b883f9)

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


- Log -
commit 4c3f51bb1880bd3e594921357d1536e991c9ecbc
Author: olivier oliv...@virtscano.fakenet
Date:   Tue Aug 3 00:20:11 2010 +0200

make scannedonly notify the scanner if no .scanned: file was found during 
rename

---

Summary of changes:
 source3/modules/vfs_scannedonly.c |   23 ---
 1 files changed, 16 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_scannedonly.c 
b/source3/modules/vfs_scannedonly.c
index 679ecc8..b76bef4 100644
--- a/source3/modules/vfs_scannedonly.c
+++ b/source3/modules/vfs_scannedonly.c
@@ -1,7 +1,7 @@
 /*
  * scannedonly VFS module for Samba 3.5
  *
- * Copyright 2007,2008,2009 (C) Olivier Sessink
+ * Copyright 2007,2008,2009,2010 (C) Olivier Sessink
  *
  * 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
@@ -766,6 +766,8 @@ static int scannedonly_rename(vfs_handle_struct * handle,
struct smb_filename *smb_fname_src_tmp = NULL;
struct smb_filename *smb_fname_dst_tmp = NULL;
char *cachefile_src, *cachefile_dst;
+   bool needscandst=false;
+   int ret;
TALLOC_CTX *ctx = talloc_tos();
 
/* Setup temporary smb_filename structs. */
@@ -777,19 +779,26 @@ static int scannedonly_rename(vfs_handle_struct * handle,
ctx,
smb_fname_dst-base_name,
STRUCTSCANO(handle-data)-p_scanned);
-
create_synthetic_smb_fname(ctx, cachefile_src,NULL,NULL,
   smb_fname_src_tmp);
create_synthetic_smb_fname(ctx, cachefile_dst,NULL,NULL,
   smb_fname_dst_tmp);
 
-   if (SMB_VFS_NEXT_RENAME(handle, smb_fname_src_tmp, smb_fname_dst_tmp)
-   != 0) {
+   ret = SMB_VFS_NEXT_RENAME(handle, smb_fname_src_tmp, smb_fname_dst_tmp);
+   if (ret == ENOENT) {
+   needscandst=true;
+   } else if (ret != 0) {
DEBUG(SCANNEDONLY_DEBUG,
- (failed to rename %s into %s\n, cachefile_src,
-  cachefile_dst));
+ (failed to rename %s into %s error %d: %s\n, 
cachefile_src,
+  cachefile_dst, ret, strerror(ret)));
+   needscandst=true;
}
-   return SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst);
+   ret = SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst);
+   if (ret == 0  needscandst) {
+   notify_scanner(handle, smb_fname_dst-base_name);
+   flush_sendbuffer(handle);
+   }
+   return ret;
 }
 
 static int scannedonly_unlink(vfs_handle_struct * handle,


-- 
Samba Shared Repository