Re: [Samba] Changing samba PDC version but keeping the same IP address

2009-06-05 Thread Frank Bonnet
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Toby Bluhm wrote:
 Frank Bonnet wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hello

 We are facing a bit boring problem

 We are on the way to upgrade our PDC from 2.2.8 to 3.2.11
 as we do not want to reconfigure the PDC IP address on several
 hundreds of windows XP clients we have chosen to keep the same
 IP address for the new PDC.

 The problem is windows clients does not update the name of network
 drives and keep the old names even connected to the new PDC server
 and it's new shares ...

 I suspect there are some caching mechanisms that are not completely
 cleaned (!!!) by windows.


 Any infos on how to clean widows caches are welcome.

 
 If I understand you correctly, you mean everything is working just fine,
 but the server name displayed in file explorer for the network drive
 letter is still the old server name.
 
 
 If that's it, check the registry:
 
 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComputerDescriptions]
 
 
 Delete the entries for the server  it will automatically refresh to the
 current setting.
 
 

Hello

Thanks for the answer, but I have a problem to do that on our ~800
windows PC ...

Is it possible to do it remotely or automate-it during boot up time ?

Thanks

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.11 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkooyX8ACgkQ6f7UMO5oSsUXMQCeKFazkku82xY4FXsvZo6H7QRX
jpAAn1ApT+nyUi2d4cLUI5jj7Exu3oua
=jhEt
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Changing samba PDC version but keeping the same IP address

2009-06-05 Thread Olivier Nicole
 We are on the way to upgrade our PDC from 2.2.8 to 3.2.11
 as we do not want to reconfigure the PDC IP address on several
 hundreds of windows XP clients we have chosen to keep the same
 IP address for the new PDC.

Why not keeping the same name for your server? Then with same name and
same IP you don't need to update anything.

You may have to keep the Samba server SID too (keep the secrets.tdb
file from one server to the other, transparent with LDAP I think).

Besys,

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


Re: [Samba] Changing samba PDC version but keeping the same IP address

2009-06-05 Thread Frank Bonnet
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Olivier Nicole wrote:
 We are on the way to upgrade our PDC from 2.2.8 to 3.2.11
 as we do not want to reconfigure the PDC IP address on several
 hundreds of windows XP clients we have chosen to keep the same
 IP address for the new PDC.
 
 Why not keeping the same name for your server? Then with same name and
 same IP you don't need to update anything.
 
 You may have to keep the Samba server SID too (keep the secrets.tdb
 file from one server to the other, transparent with LDAP I think).
 
 Besys,
 
 Olivier

Yes I know it now , it is logical captain but the preceding person which
installed the old samba version has written the samba version in the
server string statement !!! and it would be very confusing for users and
admins ... Of course the new server will have a generic name such as
Samba server .

Frank




-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.11 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoo2pwACgkQ6f7UMO5oSsVPSACgsmvdJyKh3iPItFrbzHVoA+Fx
m28AnRYDTJYAgeArQi4Ny8bL659m/FqL
=euvu
-END PGP SIGNATURE-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Changing samba PDC version but keeping the same IP address

2009-06-05 Thread Olivier Nicole
 Yes I know it now , it is logical captain but the preceding person which
 installed the old samba version has written the samba version in the
 server string statement !!! 

Ouch!

 and it would be very confusing for users and
 admins ... 

I don't think the users would notice, and maybe not even the admins.

 Of course the new server will have a generic name such as
 Samba server .

Maybe you can have your netlogon script to edit the registry and
delete the key that some other poster mentionned. That way no need to
go and modify the 800++ stations.


Bonne chance.

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


Re: [Samba] Changing samba PDC version but keeping the same IP address

2009-06-05 Thread Toby Bluhm

Frank Bonnet wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Toby Bluhm wrote:

Frank Bonnet wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello

We are facing a bit boring problem

We are on the way to upgrade our PDC from 2.2.8 to 3.2.11
as we do not want to reconfigure the PDC IP address on several
hundreds of windows XP clients we have chosen to keep the same
IP address for the new PDC.

The problem is windows clients does not update the name of network
drives and keep the old names even connected to the new PDC server
and it's new shares ...

I suspect there are some caching mechanisms that are not completely
cleaned (!!!) by windows.


Any infos on how to clean widows caches are welcome.


If I understand you correctly, you mean everything is working just fine,
but the server name displayed in file explorer for the network drive
letter is still the old server name.


If that's it, check the registry:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComputerDescriptions]


Delete the entries for the server  it will automatically refresh to the
current setting.




Hello

Thanks for the answer, but I have a problem to do that on our ~800
windows PC ...

Is it possible to do it remotely or automate-it during boot up time ?

Thanks



Something like this in your login script - should be all one line.


reg delete 
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComputerDescriptions 
/v servername_or_IP /f




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


[Samba] password authentification

2009-06-05 Thread BeefStu BeefStu

All,

 

I am trying to setup samba so that it uses the password from my AD instead of 
having a password file in SAMBA.

 

I think I have the samab.cnf file setup correctly:

 

 

[global]
workgroup = hshh;
security = DOMAIN
auth methods = ntdomain
password server = ttndc3
max xmit = 65535
socket options = TCP_NODELAY IPTOS_LOWDELAY
ldap ssl = no
oplocks = No


Can somebody tell me what I have to do on the windows 2003 side to make

this work. I am guessing I have to setup a samaba acct in AD but not to sure. 
Can somebody please verify and maybe send me a screen print.

 

In addition, let me know if I have do anything else on the UNIX end (AIX 5.3).

 

Thanks in advance to all who respond

 

_
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] I am so frustrated - Samba ports not opening and no error message

2009-06-05 Thread Matt Burkhardt
Okay - I've been plugging away and it got to the point that running
smbclient was returning information about an Alfresco install that I
never used, so I went ahead and deleted everything I could find on my
machine that said alfresco.  I then removed samba using apt-get from
the machine by typing

apt-get remove --purge samba 

I deleted the /etc/samba directory and re-installed samba.

So now I've made sure that DHCP, DNS and OpenLDAP are now working
correctly and I started to reconfigure Samba.  I start it up and I look
at the log.smbd and log.nmbd files, don't see a single error message and
when I run nmap - there's nothing listening on the ports that Samba is
supposed to be using.  I have no firewall set up and nothing between me
and the server.   Here's showing that the daemons are running:

 ps -e | grep mb
 6984 ?00:00:00 nmbd
 6986 ?00:00:00 smbd

Here's the results from nmap

 nmap ubuntu

Starting Nmap 4.53 ( http://insecure.org ) at 2009-06-05 17:34 EDT
Interesting ports on 192.168.1.100:
Not shown: 1697 closed ports
PORT  STATE SERVICE
22/tcpopen  ssh
53/tcpopen  domain
80/tcpopen  http
81/tcpopen  hosts2-ns
82/tcpopen  xfer
83/tcpopen  mit-ml-dev
111/tcp   open  rpcbind
389/tcp   open  ldap
443/tcp   open  https
631/tcp   open  ipp
901/tcp   open  samba-swat
3306/tcp  open  mysql
5001/tcp  open  commplex-link
5432/tcp  open  postgres
8009/tcp  open  ajp13
8080/tcp  open  http-proxy
1/tcp open  snet-sensor-mgmt

Nmap done: 1 IP address (1 host up) scanned in 0.151 seconds

I have attached the log.smbd, log.nmbd and smb.conf files.  Any ideas?

I can't logon - just says Connection refused.

On a side note - I can't stop samba by running

sudo /etc/init.d/samba stop

It kills the nmbd daemon but not the smbd daemon

Thanks!


-- 
Matt Burkhardt, M.Sci. Technology Management
m...@imparisystems.com
(301) 682-7901
502 Fairview Avenue
Frederick, MD  21701
http://www.imparisystems.com 

[2009/06/05 17:33:17, 0] nmbd/nmbd.c:main(721)
  Netbios nameserver version 3.0.28a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2008
[2009/06/05 17:33:17, 3] nmbd/nmbd.c:reload_nmbd_services(298)
  services not loaded
[2009/06/05 17:33:17, 2] nmbd/nmbd.c:main(745)
  Becoming a daemon.
[2009/06/05 17:33:17, 2] lib/tallocmsg.c:register_msg_pool_usage(105)
  Registered MSG_REQ_POOL_USAGE
[2009/06/05 17:33:17, 2] lib/dmallocmsg.c:register_dmalloc_msgs(75)
  Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
[2009/06/05 17:33:17, 3] nmbd/nmbd.c:main(783)
  Opening sockets 137
[2009/06/05 17:33:17, 3] nmbd/nmbd.c:open_sockets(639)
  open_sockets: Broadcast sockets opened.
[2009/06/05 17:33:17, 2] lib/interface.c:add_interface(81)
  added interface ip=192.168.1.100 bcast=192.168.1.255 nmask=255.255.255.0
[2009/06/05 17:33:17, 2] nmbd/nmbd_subnetdb.c:make_subnet(144)
  making subnet name:192.168.1.100 Broadcast address:192.168.1.255 Subnet 
mask:255.255.255.0
[2009/06/05 17:33:17, 2] nmbd/nmbd_subnetdb.c:make_subnet(144)
  making subnet name:UNICAST_SUBNET Broadcast address:192.168.1.100 Subnet 
mask:192.168.1.100
[2009/06/05 17:33:17, 2] nmbd/nmbd_subnetdb.c:make_subnet(144)
  making subnet name:REMOTE_BROADCAST_SUBNET Broadcast address:0.0.0.0 Subnet 
mask:0.0.0.0
[2009/06/05 17:33:17, 2] nmbd/nmbd_subnetdb.c:make_subnet(144)
  making subnet name:WINS_SERVER_SUBNET Broadcast address:0.0.0.0 Subnet 
mask:0.0.0.0
[2009/06/05 17:33:17, 2] nmbd/nmbd_lmhosts.c:load_lmhosts_file(41)
  load_lmhosts_file: Can't open lmhosts file /etc/samba/lmhosts. Error was No 
such file or directory
[2009/06/05 17:33:17, 3] nmbd/nmbd.c:main(802)
  Loaded hosts file /etc/samba/lmhosts
[2009/06/05 17:33:17, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(247)
  add_name_to_subnet: Added netbios name *00 with first IP 192.168.1.100 
ttl=0 nb_flags=60 to subnet WINS_SERVER_SUBNET
[2009/06/05 17:33:17, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(247)
  add_name_to_subnet: Added netbios name *20 with first IP 192.168.1.100 
ttl=0 nb_flags=60 to subnet WINS_SERVER_SUBNET
[2009/06/05 17:33:17, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(247)
  add_name_to_subnet: Added netbios name __SAMBA__20 with first IP 
192.168.1.100 ttl=0 nb_flags=60 to subnet WINS_SERVER_SUBNET
[2009/06/05 17:33:17, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(247)
  add_name_to_subnet: Added netbios name __SAMBA__00 with first IP 
192.168.1.100 ttl=0 nb_flags=60 to subnet WINS_SERVER_SUBNET
[2009/06/05 17:33:17, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(247)
  add_name_to_subnet: Added netbios name UBUNTU03 with first IP 192.168.1.100 
ttl=259053 nb_flags=66 to subnet WINS_SERVER_SUBNET
[2009/06/05 17:33:17, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(247)
  add_name_to_subnet: Added netbios name UBUNTU20 with first IP 192.168.1.100 
ttl=259053 nb_flags=66 to subnet WINS_SERVER_SUBNET
[2009/06/05 17:33:17, 3] nmbd/nmbd_namelistdb.c:add_name_to_subnet(247)
  add_name_to_subnet: Added netbios name WORKGROUP1b with 

Re: [Samba] I am so frustrated - Samba ports not opening and no error message

2009-06-05 Thread Jeremy Allison
On Fri, Jun 05, 2009 at 05:40:20PM -0400, Matt Burkhardt wrote:
 Okay - I've been plugging away and it got to the point that running
 smbclient was returning information about an Alfresco install that I
 never used, so I went ahead and deleted everything I could find on my
 machine that said alfresco.  I then removed samba using apt-get from
 the machine by typing
 
 apt-get remove --purge samba 
 
 I deleted the /etc/samba directory and re-installed samba.
 
 So now I've made sure that DHCP, DNS and OpenLDAP are now working
 correctly and I started to reconfigure Samba.  I start it up and I look
 at the log.smbd and log.nmbd files, don't see a single error message and
 when I run nmap - there's nothing listening on the ports that Samba is
 supposed to be using.  I have no firewall set up and nothing between me
 and the server.   Here's showing that the daemons are running:
 
  ps -e | grep mb
  6984 ?00:00:00 nmbd
  6986 ?00:00:00 smbd
 
 Here's the results from nmap
 
  nmap ubuntu
 
 Starting Nmap 4.53 ( http://insecure.org ) at 2009-06-05 17:34 EDT
 Interesting ports on 192.168.1.100:
 Not shown: 1697 closed ports
 PORT  STATE SERVICE
 22/tcpopen  ssh
 53/tcpopen  domain
 80/tcpopen  http
 81/tcpopen  hosts2-ns
 82/tcpopen  xfer
 83/tcpopen  mit-ml-dev
 111/tcp   open  rpcbind
 389/tcp   open  ldap
 443/tcp   open  https
 631/tcp   open  ipp
 901/tcp   open  samba-swat
 3306/tcp  open  mysql
 5001/tcp  open  commplex-link
 5432/tcp  open  postgres
 8009/tcp  open  ajp13
 8080/tcp  open  http-proxy
 1/tcp open  snet-sensor-mgmt

This ports list shows smbd is not binding to the external
ports. smbd uses TCP 139  445. nmbd uses udp 137 and 138.

Jeremy
-- 
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 - release-4-0-0alpha7-2041-gfcc7372

2009-06-05 Thread Andrew Tridgell
The branch, master has been updated
   via  fcc7372975757d19e9e4366a26396bf210bdf86a (commit)
  from  e53ee270916a5a1e6d21c4275b5307f642ab2794 (commit)

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


- Log -
commit fcc7372975757d19e9e4366a26396bf210bdf86a
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 5 16:25:44 2009 +1000

fixed handling of change notify buffer overruns

When the notify buffer overruns and there are no pending notify
requests, the notify buffer doesn't actually get destroyed, it just
gets put in a state where new notifies are discarded and the next
notify change request will return 0 changes.

---

Summary of changes:
 source4/ntvfs/posix/pvfs_notify.c |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/posix/pvfs_notify.c 
b/source4/ntvfs/posix/pvfs_notify.c
index 09aa0f6..3e6f442 100644
--- a/source4/ntvfs/posix/pvfs_notify.c
+++ b/source4/ntvfs/posix/pvfs_notify.c
@@ -34,6 +34,7 @@ struct pvfs_notify_buffer {
struct notify_changes *changes;
uint32_t max_buffer_size;
uint32_t current_buffer_size;
+   bool overflowed;
 
/* a list of requests waiting for events on this handle */
struct notify_pending {
@@ -71,7 +72,7 @@ static void pvfs_notify_send(struct pvfs_notify_buffer 
*notify_buffer,
while (notify_buffer-pending) {
pvfs_notify_send(notify_buffer, NT_STATUS_OK, 
immediate);
}
-   talloc_free(notify_buffer);
+   notify_buffer-overflowed = true;
return;
}
 
@@ -88,6 +89,7 @@ static void pvfs_notify_send(struct pvfs_notify_buffer 
*notify_buffer,
info-nttrans.out.num_changes = notify_buffer-num_changes;
info-nttrans.out.changes = talloc_steal(req, notify_buffer-changes);
notify_buffer-num_changes = 0;
+   notify_buffer-overflowed = false;
notify_buffer-changes = NULL;
notify_buffer-current_buffer_size = 0;
 
@@ -133,6 +135,10 @@ static void pvfs_notify_callback(void *private_data, const 
struct notify_event *
struct notify_changes *n2;
char *new_path;
 
+   if (n-overflowed) {
+   return;
+   }
+
n2 = talloc_realloc(n, n-changes, struct notify_changes, 
n-num_changes+1);
if (n2 == NULL) {
/* nothing much we can do for this */
@@ -267,7 +273,8 @@ NTSTATUS pvfs_notify(struct ntvfs_module_context *ntvfs,
DLIST_ADD_END(f-notify_buffer-pending, pending, struct notify_pending 
*);
 
/* if the buffer is empty then start waiting */
-   if (f-notify_buffer-num_changes == 0) {
+   if (f-notify_buffer-num_changes == 0  
+   !f-notify_buffer-overflowed) {
struct pvfs_wait *wait_handle;
wait_handle = pvfs_wait_message(pvfs, req, -1,
timeval_zero(),


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2045-g96de876

2009-06-05 Thread Stefan Metzmacher
The branch, master has been updated
   via  96de8766fc80881c4398ea11ce65cccbb9b7c83b (commit)
  from  ecd1fe2456acb1c700d7bf91eb0ec76103e7db93 (commit)

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


- Log -
commit 96de8766fc80881c4398ea11ce65cccbb9b7c83b
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Jun 2 16:07:53 2009 +0200

s3:smbd: add support for printers to SMB2 Create

This is not tested, but the code looks like the
for SMB1, so it's likely to work:-)

metze

---

Summary of changes:
 source3/smbd/smb2_create.c |   79 +++-
 1 files changed, 41 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 0f955a4..8979073 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -213,47 +213,50 @@ static NTSTATUS smbd_smb2_create(struct smbd_smb2_request 
*req,
return NT_STATUS_NO_MEMORY;
}
 
-   /* If it's an IPC, pass off the pipe handler. */
-   if (IS_IPC(req-tcon-compat_conn)) {
+   if (IS_IPC(smbreq-conn)) {
return NT_STATUS_NOT_IMPLEMENTED;
-   }
-
-   if (CAN_PRINT(req-tcon-compat_conn)) {
-   return NT_STATUS_NOT_IMPLEMENTED;
-   }
+   } else if (CAN_PRINT(smbreq-conn)) {
+   status = file_new(smbreq, smbreq-conn, result);
+   if(!NT_STATUS_IS_OK(status)) {
+   return status;
+   }
 
-   switch (in_oplock_level) {
-   case SMB2_OPLOCK_LEVEL_BATCH:
-   break;
-   case SMB2_OPLOCK_LEVEL_EXCLUSIVE:
-   break;
-   default:
-   break;
-   }
-
-   /* these are ignored for SMB2 */
-   in_create_options = ~(0x10);/* NTCREATEX_OPTIONS_SYNC_ALERT */
-   in_create_options = ~(0x20);/* NTCREATEX_OPTIONS_ASYNC_ALERT */
+   status = print_fsp_open(smbreq,
+   smbreq-conn,
+   in_name,
+   smbreq-vuid,
+   result,
+   sbuf);
+   if (!NT_STATUS_IS_OK(status)) {
+   file_free(smbreq, result);
+   return status;
+   }
+   info = FILE_WAS_CREATED;
+   } else {
+   /* these are ignored for SMB2 */
+   in_create_options = ~(0x10);/* NTCREATEX_OPTIONS_SYNC_ALERT */
+   in_create_options = ~(0x20);/* NTCREATEX_OPTIONS_ASYNC_ALERT */
 
-   status = SMB_VFS_CREATE_FILE(req-tcon-compat_conn,
-smbreq,
-0, /* root_dir_fid */
-in_name,
-CFF_DOS_PATH, /* create_file_flags */
-in_desired_access,
-in_share_access,
-in_create_disposition,
-in_create_options,
-in_file_attributes,
-0, /* oplock_request */
-0, /* allocation_size */
-NULL, /* security_descriptor */
-NULL, /* ea_list */
-result,
-info,
-sbuf);
-   if (!NT_STATUS_IS_OK(status)) {
-   return status;
+   status = SMB_VFS_CREATE_FILE(req-tcon-compat_conn,
+smbreq,
+0, /* root_dir_fid */
+in_name,
+CFF_DOS_PATH, /* create_file_flags 
*/
+in_desired_access,
+in_share_access,
+in_create_disposition,
+in_create_options,
+in_file_attributes,
+0, /* oplock_request */
+0, /* allocation_size */
+NULL, /* security_descriptor */
+NULL, /* ea_list */
+result,
+info,
+sbuf);
+   if (!NT_STATUS_IS_OK(status)) {
+   return status;
+   

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2047-g1b806d8

2009-06-05 Thread Stefan Metzmacher
The branch, master has been updated
   via  1b806d83b723216e3e16778ce33ae710fab2c011 (commit)
   via  160ead46dc13e908903e70e372bdafc2ba8f4615 (commit)
  from  96de8766fc80881c4398ea11ce65cccbb9b7c83b (commit)

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


- Log -
commit 1b806d83b723216e3e16778ce33ae710fab2c011
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Jun 2 16:07:08 2009 +0200

s3:smbd: make smbd_server_connection_terminate() a macro

metze

commit 160ead46dc13e908903e70e372bdafc2ba8f4615
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jun 5 11:05:03 2009 +0200

s3:smbd: implement smbd_smb2_request_error/done() as macros on top of the 
_ex() function

metze

---

Summary of changes:
 source3/include/smb_macros.h  |3 ---
 source3/smbd/globals.h|   22 --
 source3/smbd/smb2_server.c|   39 ---
 source3/smbd/smb2_sesssetup.c |3 ++-
 4 files changed, 34 insertions(+), 33 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 6dd9cab..7528883 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -339,7 +339,4 @@ extern const char toupper_ascii_fast_table[];
 #define toupper_ascii_fast(c) toupper_ascii_fast_table[(unsigned int)(c)];
 #endif
 
-#define smbd_smb2_request_error(req, status) \
-   smbd_smb2_request_error_((req), (status), __location__)
-
 #endif /* _SMB_MACROS_H */
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 4c90e8f..26e63f1 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -170,20 +170,30 @@ NTSTATUS smb2_signing_check_pdu(DATA_BLOB session_key,
const struct iovec *vector,
int count);
 
+void smbd_server_connection_terminate_ex(struct smbd_server_connection *sconn,
+const char *reason,
+const char *location);
+#define smbd_server_connection_terminate(sconn, reason) \
+   smbd_server_connection_terminate_ex(sconn, reason, __location__)
+
 bool smbd_is_smb2_header(const uint8_t *inbuf, size_t size);
 
 void reply_smb2002(struct smb_request *req, uint16_t choice);
 void smbd_smb2_first_negprot(struct smbd_server_connection *conn,
 const uint8_t *inbuf, size_t size);
 
-NTSTATUS smbd_smb2_request_error_(struct smbd_smb2_request *req,
-NTSTATUS status,
-const char *wherestr);
+NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,
+   NTSTATUS status,
+   DATA_BLOB *info,
+   const char *location);
+#define smbd_smb2_request_error(req, status) \
+   smbd_smb2_request_error_ex(req, status, NULL, __location__)
 NTSTATUS smbd_smb2_request_done_ex(struct smbd_smb2_request *req,
   NTSTATUS status,
-  DATA_BLOB body, DATA_BLOB *dyn);
-NTSTATUS smbd_smb2_request_done(struct smbd_smb2_request *req,
-   DATA_BLOB body, DATA_BLOB *dyn);
+  DATA_BLOB body, DATA_BLOB *dyn,
+  const char *location);
+#define smbd_smb2_request_done(req, body, dyn) \
+   smbd_smb2_request_done_ex(req, NT_STATUS_OK, body, dyn, __location__)
 
 NTSTATUS smbd_smb2_request_check_session(struct smbd_smb2_request *req);
 NTSTATUS smbd_smb2_request_check_tcon(struct smbd_smb2_request *req);
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 5c4bdca..e797bdd 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -277,10 +277,12 @@ static NTSTATUS smbd_smb2_request_setup_out(struct 
smbd_smb2_request *req)
return NT_STATUS_OK;
 }
 
-static void smbd_server_connection_terminate(struct smbd_server_connection 
*conn,
-const char *reason)
+void smbd_server_connection_terminate_ex(struct smbd_server_connection *sconn,
+const char *reason,
+const char *location)
 {
-   DEBUG(10,(smbd_server_connection_terminate: reason[%s]\n, reason));
+   DEBUG(10,(smbd_server_connection_terminate_ex: reason[%s] at %s\n,
+ reason, location));
exit_server_cleanly(reason);
 }
 
@@ -583,17 +585,18 @@ static void smbd_smb2_request_writev_done(struct 
tevent_req *subreq)
talloc_free(mem_pool);
 }
 
-static NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,
+NTSTATUS smbd_smb2_request_error_ex(struct smbd_smb2_request *req,

[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5282-g8878670

2009-06-05 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  8878670414bd2607ad238b4fb61a109d5f430538 (commit)
  from  f9ea09b61a46136fc55314e2e1cd2e9cfb362802 (commit)

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


- Log -
commit 8878670414bd2607ad238b4fb61a109d5f430538
Author: Karolin Seeger ksee...@samba.org
Date:   Fri Jun 5 15:35:05 2009 +0200

s3/docs: Fix typo.

Karolin
(cherry picked from commit 613c8acbdd93210b40ec6fa48cbbf297a061b3cc)
(cherry picked from commit c84f1c7ac9da7e26f28cb233efe45614f0cedea3)

---

Summary of changes:
 docs-xml/smbdotconf/protocol/unixextensions.xml |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/protocol/unixextensions.xml 
b/docs-xml/smbdotconf/protocol/unixextensions.xml
index 5b4a36a..da9ad10 100644
--- a/docs-xml/smbdotconf/protocol/unixextensions.xml
+++ b/docs-xml/smbdotconf/protocol/unixextensions.xml
@@ -4,8 +4,8 @@
  advanced=1 developer=1
  xmlns:samba=http://www.samba.org/samba/DTD/samba-doc;
  description
-paraThis boolean parameter controls whether Samba 
-implments the CIFS UNIX extensions, as defined by HP. 
+paraThis boolean parameter controls whether Samba
+implements the CIFS UNIX extensions, as defined by HP.
 These extensions enable Samba to better serve UNIX CIFS clients
 by supporting features such as symbolic links, hard links, etc...
 These extensions require a similarly enabled client, and are of


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2058-g61cf117

2009-06-05 Thread Günther Deschner
The branch, master has been updated
   via  61cf117f86f803b839539db0f806c1c413f664de (commit)
   via  59ee0a1e8a35c1ced97e67a2c7bf5da67a55c2a0 (commit)
   via  af0b586c7452dd897e5d75c20ce5b929db86e34a (commit)
  from  c110e664af9449e8fac24f4ed6e973d98d4fd268 (commit)

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


- Log -
commit 61cf117f86f803b839539db0f806c1c413f664de
Author: Günther Deschner g...@samba.org
Date:   Fri Jun 5 00:33:14 2009 +0200

nss_wrapper: add cross checking test to testsuite.

Guenther

commit 59ee0a1e8a35c1ced97e67a2c7bf5da67a55c2a0
Author: Günther Deschner g...@samba.org
Date:   Thu Jun 4 23:57:43 2009 +0200

nss_wrapper: add tests for getgrent_r to testsuite.

Guenther

commit af0b586c7452dd897e5d75c20ce5b929db86e34a
Author: Günther Deschner g...@samba.org
Date:   Thu Jun 4 22:52:03 2009 +0200

nss_wrapper: add tests for getpwent_r to testsuite.

Guenther

---

Summary of changes:
 lib/nss_wrapper/testsuite.c |  362 +++
 1 files changed, 362 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/nss_wrapper/testsuite.c b/lib/nss_wrapper/testsuite.c
index 57c61f6..e4047cf 100644
--- a/lib/nss_wrapper/testsuite.c
+++ b/lib/nss_wrapper/testsuite.c
@@ -72,6 +72,33 @@ static bool test_nwrap_getpwnam(struct torture_context *tctx,
return pwd ? true : false;
 }
 
+static bool test_nwrap_getpwnam_r(struct torture_context *tctx,
+ const char *name,
+ struct passwd *pwd_p)
+{
+   struct passwd pwd, *pwdp;
+   char buffer[4096];
+   int ret;
+
+   torture_comment(tctx, Testing getpwnam_r: %s\n, name);
+
+   ret = getpwnam_r(name, pwd, buffer, sizeof(buffer), pwdp);
+   if (ret != 0) {
+   if (ret != ENOENT) {
+   torture_comment(tctx, got %d return code\n, ret);
+   }
+   return false;
+   }
+
+   print_passwd(pwd);
+
+   if (pwd_p) {
+   copy_passwd(tctx, pwd, pwd_p);
+   }
+
+   return true;
+}
+
 static bool test_nwrap_getpwuid(struct torture_context *tctx,
uid_t uid,
struct passwd *pwd_p)
@@ -92,6 +119,34 @@ static bool test_nwrap_getpwuid(struct torture_context 
*tctx,
return pwd ? true : false;
 }
 
+static bool test_nwrap_getpwuid_r(struct torture_context *tctx,
+ uid_t uid,
+ struct passwd *pwd_p)
+{
+   struct passwd pwd, *pwdp;
+   char buffer[4096];
+   int ret;
+
+   torture_comment(tctx, Testing getpwuid_r: %lu\n, (unsigned long)uid);
+
+   ret = getpwuid_r(uid, pwd, buffer, sizeof(buffer), pwdp);
+   if (ret != 0) {
+   if (ret != ENOENT) {
+   torture_comment(tctx, got %d return code\n, ret);
+   }
+   return false;
+   }
+
+   print_passwd(pwd);
+
+   if (pwd_p) {
+   copy_passwd(tctx, pwd, pwd_p);
+   }
+
+   return true;
+}
+
+
 static bool copy_group(struct torture_context *tctx,
   const struct group *grp,
   struct group *g)
@@ -151,6 +206,34 @@ static bool test_nwrap_getgrnam(struct torture_context 
*tctx,
return grp ? true : false;
 }
 
+static bool test_nwrap_getgrnam_r(struct torture_context *tctx,
+ const char *name,
+ struct group *grp_p)
+{
+   struct group grp, *grpp;
+   char buffer[4096];
+   int ret;
+
+   torture_comment(tctx, Testing getgrnam_r: %s\n, name);
+
+   ret = getgrnam_r(name, grp, buffer, sizeof(buffer), grpp);
+   if (ret != 0) {
+   if (ret != ENOENT) {
+   torture_comment(tctx, got %d return code\n, ret);
+   }
+   return false;
+   }
+
+   print_group(grp);
+
+   if (grp_p) {
+   copy_group(tctx, grp, grp_p);
+   }
+
+   return true;
+}
+
+
 static bool test_nwrap_getgrgid(struct torture_context *tctx,
gid_t gid,
struct group *grp_p)
@@ -171,6 +254,33 @@ static bool test_nwrap_getgrgid(struct torture_context 
*tctx,
return grp ? true : false;
 }
 
+static bool test_nwrap_getgrgid_r(struct torture_context *tctx,
+ gid_t gid,
+ struct group *grp_p)
+{
+   struct group grp, *grpp;
+   char buffer[4096];
+   int ret;
+
+   torture_comment(tctx, Testing getgrgid_r: %lu\n, (unsigned long)gid);
+
+   ret = getgrgid_r(gid, grp, buffer, sizeof(buffer), grpp);
+   if (ret != 0) {
+

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2078-g64a1f17

2009-06-05 Thread Jeremy Allison
The branch, master has been updated
   via  64a1f17aff1d17b74398fb270aac5768fd312cf6 (commit)
  from  68a1ef21971b5c15db5d0a82acc89791ffceaee0 (commit)

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


- Log -
commit 64a1f17aff1d17b74398fb270aac5768fd312cf6
Author: Jeremy Allison j...@samba.org
Date:   Fri Jun 5 16:06:05 2009 -0700

Make cli_ftruncate async. Also add a simple test.
Jeremy.

---

Summary of changes:
 source3/include/proto.h  |8 ++-
 source3/libsmb/clifile.c |  188 ++
 source3/libsmb/libsmb_file.c |2 +-
 source3/torture/torture.c|   24 ++
 4 files changed, 148 insertions(+), 74 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 961b3e0..19314e0 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2494,7 +2494,13 @@ struct tevent_req *cli_close_send(TALLOC_CTX *mem_ctx,
  struct cli_state *cli, uint16_t fnum);
 NTSTATUS cli_close_recv(struct tevent_req *req);
 NTSTATUS cli_close(struct cli_state *cli, uint16_t fnum);
-bool cli_ftruncate(struct cli_state *cli, uint16_t fnum, uint64_t size);
+struct tevent_req *cli_ftruncate_send(TALLOC_CTX *mem_ctx,
+   struct event_context *ev,
+   struct cli_state *cli,
+   uint16_t fnum,
+   uint64_t size);
+NTSTATUS cli_ftruncate_recv(struct tevent_req *req);
+NTSTATUS cli_ftruncate(struct cli_state *cli, uint16_t fnum, uint64_t size);
 NTSTATUS cli_locktype(struct cli_state *cli, uint16_t fnum,
  uint32_t offset, uint32_t len,
  int timeout, unsigned char locktype);
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 693d976..a2f089c 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -1981,45 +1981,6 @@ NTSTATUS cli_nt_delete_on_close(struct cli_state *cli, 
uint16_t fnum, bool flag)
return status;
 }
 
-#if 0
-int cli_nt_delete_on_close(struct cli_state *cli, uint16_t fnum, bool flag)
-{
-   unsigned int data_len = 1;
-   unsigned int param_len = 6;
-   uint16_t setup = TRANSACT2_SETFILEINFO;
-   char param[6];
-   unsigned char data;
-   char *rparam=NULL, *rdata=NULL;
-
-   memset(param, 0, param_len);
-   SSVAL(param,0,fnum);
-   SSVAL(param,2,SMB_SET_FILE_DISPOSITION_INFO);
-
-   data = flag ? 1 : 0;
-
-   if (!cli_send_trans(cli, SMBtrans2,
-   NULL,/* name */
-   -1, 0,  /* fid, flags */
-   setup, 1, 0,   /* setup, length, max */
-   param, param_len, 2,/* param, length, max */
-   (char *)data,  data_len, cli-max_xmit /* data, 
length, max */
-   )) {
-   return false;
-   }
-
-   if (!cli_receive_trans(cli, SMBtrans2,
-   rparam, param_len,
-   rdata, data_len)) {
-   return false;
-   }
-
-   SAFE_FREE(rdata);
-   SAFE_FREE(rparam);
-
-   return true;
-}
-#endif
-
 struct cli_ntcreate_state {
uint16_t vwv[24];
uint16_t fnum;
@@ -2506,50 +2467,133 @@ NTSTATUS cli_close(struct cli_state *cli, uint16_t 
fnum)
  Truncate a file to a specified size
 /
 
-bool cli_ftruncate(struct cli_state *cli, uint16_t fnum, uint64_t size)
+struct ftrunc_state {
+   uint16_t setup;
+   uint8_t param[6];
+   uint8_t data[8];
+};
+
+static void cli_ftruncate_done(struct tevent_req *subreq)
 {
-   unsigned int param_len = 6;
-   unsigned int data_len = 8;
-   uint16_t setup = TRANSACT2_SETFILEINFO;
-   char param[6];
-   unsigned char data[8];
-   char *rparam=NULL, *rdata=NULL;
-   int saved_timeout = cli-timeout;
+   struct tevent_req *req = tevent_req_callback_data(
+   subreq, struct tevent_req);
+   struct ftrunc_state *state = tevent_req_data(req, struct ftrunc_state);
+   NTSTATUS status;
 
-   SSVAL(param,0,fnum);
-   SSVAL(param,2,SMB_SET_FILE_END_OF_FILE_INFO);
-   SSVAL(param,4,0);
+   status = cli_trans_recv(subreq, state, NULL, NULL, NULL, NULL, NULL, 
NULL);
+   TALLOC_FREE(subreq);
+   if (!NT_STATUS_IS_OK(status)) {
+   tevent_req_nterror(req, status);
+   return;
+   }
+   tevent_req_done(req);
+}
 
-SBVAL(data, 0, size);
+struct tevent_req *cli_ftruncate_send(TALLOC_CTX *mem_ctx,
+   struct