Re: [Samba] adding users in smbpasswd file instead of Directory

2005-07-24 Thread Ilia Chipitsine

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Saravanan wrote:
| Hi,
|
| I am new to ldap. I am following Gerald Carter ldap
| system admin book.
|
| when i add user using
|
| [EMAIL PROTECTED] openldap]# smbpasswd -a saravanan
| [  OK  ]
| New SMB password:
| Retype new SMB password:
|
| it is updating users in /etc/samba/smbpasswd file
| instead of updating the Directory. Both openldap and
| samba runs in the same server. First I compiled samba
| without --with-ldapsam. Now i compiled the samba with
| --with-ldapsam. Still it is updating smbpasswd file.

Saravanan,

I need to update the book.  That covers the LDAP setup
for Samba 2.2.  For now, you are better off following
the passdb documentations in the samba/docs/ directory.


| [global]
|netbios name   = LDAP  |workgroup  = LDAP

and don't set the netbios name and workgroup to
the values.  It will be painful.


probably samba should do some checks:

1) both wins server and wins support set

2) netbios name = workgroup

I'd suggest that samba won't start if it encounters such things in 
smb.conf.








cheers, jerrty
=
Alleviating the pain of Windows(tm)  --- http://www.samba.org
GnuPG Key- http://www.plainjoe.org/gpg_public.asc
I never saved anything for the swim back. Ethan Hawk in Gattaca
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC4qcOIR7qMdg1EfYRAksRAKDKtpcKjyviIfF0oFfgYnzdCFNDUQCg599o
3pVTiQ9FfdR7NCl6jROrNaU=
=lbvo
-END PGP SIGNATURE-
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


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


Re: [Samba] Authenticate pptpd server on a domain controller

2005-07-24 Thread Ilia Chipitsine

I'm running the following configuration:

samba3/ldap -- freeradius -- mpd(freebsd pptp server)

the key word here is radius (freeradius, for instance) it makes use of NT 
hashes which are already present in ldap.


not sure that I can help with samba-2.2, but if You consider upgrading to 
3.0, I can share config.


Cheers,
Ilia Chipitsine


Hello.

I have two servers:
-One is a vpn server with pptpd. It has debian sarge 3.1, kernel(2.6.8), 
pptd(1.2.1-4), ppp(2.4.3-2) and Samba(3.0.14a-3). All the accounts to log on 
the vpn are on /etc/ppp/chap-secrets file.

-The other is a pdc with samba(2.2.7) in red hat 8

I want the accounts in the first server (chap-secrets file) authenticate 
against the pdc server (/etc/samba/smbpasswd) on the second.

I read that it is possible using winbind, kerberos and pam. I have been making 
some configurations but I haven't made yet it works.  I want to know what is 
the best way and how to make.

I have traied these two links.:
1- Replacing a Windows PPTP server with Linux HOWTO 
http://poptop.sourceforge.net/dox/replacing-windows-pptp-with-linux-howto.phtml

2- Chapter 23. Winbind: Use of Domain Accounts 
http://us2.samba.org/samba/docs/man/Samba3-HOWTO/winbind.html

but the two show the same error when I try to join the pptpd server on the pdc. 
All the configurations were made in the pptpd server not on the pdc.

-The fisrt one displays
  Proxy2:/etc/samba# net join -U root
  root's password:
  [2005/07/22 16:02:01, 0] utils/net_ads.c:ads_startup(191)
   ads_connect: Transport endpoint is not connected
  [2005/07/22 16:02:01, 0] rpc_client/cli_netlogon.c:cli_nt_setup_creds(256)
   cli_nt_setup_creds: request challenge failed
  Creation of workstation account failed
  User specified does not have administrator privileges
  Unable to join domain DUCOR.

-The second one displays
 Proxy2:/etc/samba# net rpc join -S servdb1 -U root
 [2005/07/22 16:03:35, 0] rpc_client/cli_netlogon.c:cli_nt_setup_creds(256)
   cli_nt_setup_creds: request challenge failed
 Password:
 Creation of workstation account failed
 User specified does not have administrator privileges
 Unable to join domain DUCOR.

I would thank if somebody can help me.

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


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


Re: [Samba] Hints about large network!

2005-07-24 Thread Ilia Chipitsine

Hi.

In few weeks I'm planning to set up a windows network over our departmental 
net. I need some advices, suggestions about what you would do. We're in front 
of a large network. I'm expecting having 50++ computers logging in the


not that large :-)

friend of mine is running 300+ computers with samba.
I run 80+ computers samba domain.

windows domain, many different users. Servers will be just unix (linux 
mainly, and aix/bsd for experiments only)


there's very important point, called KISS (keep it simple, stupid).
complicated things like linux/aix/bsd/w2k3/w2k/AFS/krb5 are known hard to 
maintain.




The underlying structure is really simple. All clients (aix, bsd, linux, 
macosx) are authenticating over our kerberos realm (linux kdcs). User 
informations are on ldap (home, shell, gid, uid, additional gids...), no 
password since ldap uses kerberos via gssapi. File serving is provided by 
AFS. All users have their home in /afs/cell.name/users/INITIAL/username, no 
local users. It works perfectly.


Now, I'd like to add windows clients. Since they cannot authenticate over MIT 
using AFS and LDAP, I'm working with samba. Before starting from the wrong 
assumptions, I'd appreciate some suggestions. This is my plan for windows.



-Since we have a realm CELL.NAME, I'd use a workgroup: WIN.CELL.NAME
-Netbios name for pdc should be the same as in the dns: SMB.CELL.NAME
-We have NO ldap passwords: tbsam.


if You have passwords in tdb, You can migrate to ldap by using pdbedit.




I have some concerns. What I'd really like is probably not good.

- Passwords. We're using kerberos... Any change to samba should be redirected 
to kerberos. Anyone doing some tricks here?


it has been discussed many times, just search the list, samba3 goes well 
with Heimdal. which kerberos do You have ?




- Home directories. The logon home should be \\AFS\CELL.NAME\users\initial\%U 
--- quite weird for windows. Moreover, this creates some directories in the 
unix space (users and settings\user, with desktop  co).


- Profiles. Is it a good idea to store profiles in each user's home?


yes. it is good.




I'm confused, ms-network makes more difficulties than solving problems, but I 
have to do that...


Can you give me some impressions? Add that I'd like to add a BDC... Any 
suggestion is really appreciated. I want to plan better before rather than 
complainig after :)


Thanks!

--
Sensei [EMAIL PROTECTED]

cd /pub
more beer

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


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


[Samba] Gerhard Schaller/HOL_DV/Kuester/DE ist außer Hau s. ['Watchdog': checked]

2005-07-24 Thread gerhard . schaller
Ich bin außer Haus ab 23.07.2005 und für Sie wieder erreichbar ab
14.08.2005.

I'm not in the office on 23.07.2005 and will be available to you on
14.08.2005.


Ich werde Ihre Nachricht nach meiner Rückkehr beantworten.
Diese E-mail ist nur für den bezeichneten Adressaten bestimmt und kann
vertrauliche und/oder rechtlich geschützte Informationen enthalten. Sollten
Sie diese E-mail irrtümlich erhalten haben, informieren Sie bitte sofort
den Absender und vernichten Sie diese E-mail. Wenn Sie nicht der
vorgesehene Adressat dieser E-mail sein sollten, so beachten Sie bitte,
dass jede Überarbeitung, Weiterleitung, Verbreitung oder jeder weitere
Gebrauch dieser E-mail ausdrücklich untersagt ist.

This e-mail is intended solely for the addressee and may contain
confidential and/or privileged information. If you are not the intended
recipient, please notify the sender immediately and destroy this e-mail. In
this case any form of reproduction, disclosure, distribution or any action
taken or refrained from in reliance on it, is strictly prohibited.



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


Re: [Samba] Setup Recommendation Needed

2005-07-24 Thread Ilia Chipitsine
how You can use single user database. I had an idea, but I didn't have 
a time to test it :-)


a) passwords are stored in kerberos, both samba and AD domain use 
kerberos.


b) users are stored either in samba/ldapsam or AD, and imported/exported 
via LDIF format (AD allows importing/exporting such stuff using LDIF, 
without passwords)



Here is what I have:
I have a home office with a Windows 2000 active directory domain.  I
have a remote office running Samba 3.0.14a connected to the home office
via a VPN.  All users at the remote office are required to have an
account on the active directory domain at the home office for several
reasons, including the use of Exchange Server.  All client machines at
the remote office run XP Pro.

Required Options:
*  I need to be able to run logon scripts locally at the remote office,
from the Samba server at the remote office.
*  I need for each user to have a single user account and it needs to be
the one in active directory on the domain controller at the home office.


Optional Result:
*  I would like the XP Pro client machines to still be able to log on if
the VPN connect gets dropped.  I believe this is taken care of already
due to the fact that the XP machines will cache the logon credentials,
but I thought I would mention that in case there is a better way of
doing this.

General Question:
How do I go about setting this up?  I have looked at the docs and have
been messing around with several different settings and can't quite
figure it out.

Specific Questions:
1.)  What samba security mode should I be using?
2.)  Should the samba server workgroup setting be unique for the remote
site or the same as the home office domain?
3.)  Should the samba server be joined to the home office domain?
4.)  What domain should the XP Pro clients join, the local domain or the
home office domain?
5.)  Does this require winbind to work?

Thanks to all in advance.

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


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


[Samba] Automated reply from [EMAIL PROTECTED]

2005-07-24 Thread neme1
This email account is no longer valid. You email HAS NOT been forwarded (too 
much spam).

Please use [EMAIL PROTECTED] 

You may also refer to http://www.tascamgiga.com/contact_us.php for other 
contact information.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] RPC protocol error with one user on login (64 bit svr 2003 client - samba 3.0.14a PDC)

2005-07-24 Thread Brad Langhorst
This user is attemting to log in on a win2003 64 bit client to a PDC
running 3.0.14a.

The user is able to log on on another machine (32 bit, I don't have
another 64 bit machine)

There was a local user with the same username but that user was deleted
after adding the machine to the domain.

I cannot see an error in a level 5 log from the client.
I see nothing in the windows event log.

I did find a similar thread from the end of may
Re: [Samba] RPC error logging in to PDC on Win-64

but no resolution...

Jeremy and Jerry asked for a packet dump... 
I have made that dump.

The strange bit is that this error does not occur for another user with
the same permission set.

please find the trace here:
http://langhorst.com/rpc_error.pcap

a level 5 log fragment can be found here:
http://langhorst.com/rpc_error.smblog

or a tgz with both here:
http://langhorst.com/rpc_errors_64bitlogon.tgz

I'm trying to figure this out myself but it's going to be slow going...

thanks for any help!

brad



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


[Samba] the winbind problem, 'wbinfo -u' have the user but 'getent passwd' haven't the user

2005-07-24 Thread Nir Livni
 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] RPC protocol error with one user on login (64 bit svr 2003 client - samba 3.0.14a PDC)

2005-07-24 Thread Jeremy Allison
On Sun, Jul 24, 2005 at 01:48:43PM -0400, Brad Langhorst wrote:
 This user is attemting to log in on a win2003 64 bit client to a PDC
 running 3.0.14a.
 
 The user is able to log on on another machine (32 bit, I don't have
 another 64 bit machine)
 
 There was a local user with the same username but that user was deleted
 after adding the machine to the domain.
 
 I cannot see an error in a level 5 log from the client.
 I see nothing in the windows event log.
 
 I did find a similar thread from the end of may
 Re: [Samba] RPC error logging in to PDC on Win-64
 
 but no resolution...

That's because it got fixed in the SAMBA_3_0 SVN code. It's
also fixed in the 3.0.20 pre release.

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


Re: [Samba] Logins require local admin membership on Windows XP

2005-07-24 Thread Lee Ball

If anyone is interested I finally got to the bottom of this.

The problem? ntuser.dat. Why? The domain SID was different to the one 
listed in the ntuser.dat files.


Solved using the profiles command and a -c (change) and -n (new) switch.

For example, the ntuser.dat files inside each person profiles contained 
a reference to the a domain SID, but not the correct one, must be the 
old one I thought.


Running the command profiles -c {old domain ID} -n {new domain ID} 
ntuser.dat changes the ntuser.dat file to what it should be. However, if 
you just do this on the roaming profile and leave one locally on the 
clients machine then when you login it will just use the local one 
rather then the roaming one.


I know I could change the domain SID that is currently set to the old 
one (how it should have been done after the upgrade) but a) I don't 
quite know how and b) I'm sure it will break the new ntuser.dat files 
that have been created (new users) and will break some other things as I 
noticed that some people had the correct references in their .dat files.


Although this appears to work, there is one Windows XP machine and user 
account which has given me a headache.Even though I removed all traces 
of the users profiles and account from the machine and updated the 
ntuser.dat file on the server it still changed back once the user had 
logged in. Weird.


Only NT based OS's use the SIDs in this, which is why the Windows 98 
clients didn't have a problem as they are dumb when it comes to 
security. I guess adding local administrator rights allows any user on a 
domain to alter the HKey Local User registry settings.


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


[Samba] unified windows + login authentication

2005-07-24 Thread Chicago Boy
Hello,

Problem description: Provide a common
username/password
for Linux and Windows machines. 

Current situation:

I am using NIS and samba PDC to provide unified login
access for windows and Linux machines. With this
implementation, all most all our requirements are met
but an important essential requirement. When users
change password using passwd command,
windows password 'doesn't' get updated. When users
change password in Windows, Unix password 'does' get
updated. How to update windows password when unix
password is changed?. 

Creating an alias passwd for smbpasswd -r PDC doesnt
solve all the problems. Users' account passwords are
expired when they were first created. So, users are
forced to change password on first login. They might
log in via ssh or on console. passwd program is not
used by either of them. So, creating an alias doesn't
work. We need one at lower level like PAM. Any help on
how this requirement can be met is appreciated.

Thanks,
Raj


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] logon drive, ldap ssl = start_tls, ssh and client/server encryption (and logon.bat permission tip)

2005-07-24 Thread Paul Henry
Dear list, 

More questions on my PDC travels ;-)

1. Is it ok, with roaming profiles on, to leave logon drive = 
empty, as this drive seems to be confusing users?

2. All my ldap stuff is using tls, and I just want to confirm that
ldap ssl = start_tls is looking in /etc/ldap.conf for certificate
locations etc.?

3. Is all traffic between Windows clients and the Samba server
encrypted, or can this be done/how?

4. Nowhere in Samba How-To or Samba-Guide did it say that the
logon.bat (logon script, whatever you wish to name it) should be
permission 744, i.e. chmod 744 could we add this?

5. Why do you need to ldap enable sshd via pam? This lets any domain
user log into the server. I think this is a bad idea, unless you are
providing shell access for some reason?

Thanks for your time,

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



Re: [Samba] RPC protocol error with one user on login (64 bit svr 2003 client - samba 3.0.14a PDC)

2005-07-24 Thread Brad Langhorst
On Sun, 2005-07-24 at 11:21 -0700, Jeremy Allison wrote:

  I did find a similar thread from the end of may
  Re: [Samba] RPC error logging in to PDC on Win-64
  
  but no resolution...
 
 That's because it got fixed in the SAMBA_3_0 SVN code. It's
 also fixed in the 3.0.20 pre release.
 
 Jeremy

thanks for the reply... i should have checked the commits...

brad

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


[Samba] High CPU with 3.0.14a in FC4

2005-07-24 Thread Brad Horrocks (Secure Office Services)
hi everyone,
I've been subscribed to the mailing lists for about 18 months to 2 years but
have never had the opportunity to post.

One of our clients has a box that is a 3Ghz Pentium 4 running FC1 and 512 MB
of memory. An upgrade was performed to FC4 [2 make use of ACL's].  We haven't
yet started to implement ACL's [or made any changes to the Samba configuration].

The problem we are experiencing is that the standard daemon processes [SMBD]
are using significantly more CPU [processes that were running a 10% are now
running at over 40%]. 

Has anybody seen or heard of this before or is this a FC4 specific problem.
The boxes are primarily Windows file sharers but they do run qmail as well.

Any help would be greatly appreciated

Regards
Brad Horrocks

--
Secure Office Services 
ABN 75 196 364 531
19 Burrendong Road
COOMBABAH QLD 4216
Ph. +61 7 5537 4955
Fx. +61 7 5537 4966
web: http://www.secureoffice.com.au

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


[Samba] QUARANTINED: test

2005-07-24 Thread WorkgroupMail Content Filter
The message test from , sent on 26/07/2005 00:08 was quarantined because it 
contained either an executable file, a batch file or a screen saver file. All 
of these types of attachments are considered security risks. Please consult 
your mail administrator who can release the message.

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


[Samba] missing directories

2005-07-24 Thread bill no

Running Samba 3.0.14a under kernal 2.6.11-1.1369 (Fedora core 4)

I'm trying to set up a file server for use with XP network.  I have an 
interesting problem that came to light when I had difficulty connecting from 
Windows.


I can set up a shared directory exactly as detailed in the troubleshooting 
guide (setting up /tmp as tmp) and can connect from my account on the 
server.


If I try to set up a share under /home I get 
NT_STATUS_NETWORK_ACCESS_DENIED.  Same if I try and set up a share to a 
directory called /storage which is a mount point for a spare drive.  It 
isn't a typo in smb.conf, because copying the working /tmp text and simply 
changing the target directory doesn't work either.


Interestingly (and here's where things get wierd), if I set / to be a 
samba share and connect from my account, listing the files in the drive 
omits /home and /storage.  If I create a new directory as root in / I can 
successfully set it up in samba.


There seems to be no issue with permissions (I tried setting /storage to 
777).  All directories are owned by root from group root.


I assume something trivial is the cause but am at a loss.

Rgds


Bill

_
Sell your car for $9 on carpoint.com.au   
http://www.carpoint.com.au/sellyourcar


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


svn commit: samba r8733 - in trunk/source/smbd: .

2005-07-24 Thread vlendec
Author: vlendec
Date: 2005-07-24 08:35:31 + (Sun, 24 Jul 2005)
New Revision: 8733

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8733

Log:
Reformatting
Modified:
   trunk/source/smbd/reply.c


Changeset:
Modified: trunk/source/smbd/reply.c
===
--- trunk/source/smbd/reply.c   2005-07-24 04:42:38 UTC (rev 8732)
+++ trunk/source/smbd/reply.c   2005-07-24 08:35:31 UTC (rev 8733)
@@ -5047,7 +5047,8 @@
  Reply to a lockingX request.
 /
 
-int reply_lockingX(connection_struct *conn, char *inbuf,char *outbuf,int 
length,int bufsize)
+int reply_lockingX(connection_struct *conn, char *inbuf, char *outbuf,
+  int length, int bufsize)
 {
files_struct *fsp = file_fsp(inbuf,smb_vwv2);
unsigned char locktype = CVAL(inbuf,smb_vwv3);
@@ -5059,7 +5060,8 @@
int32 lock_timeout = IVAL(inbuf,smb_vwv4);
int i;
char *data;
-   BOOL large_file_format = (locktype  
LOCKING_ANDX_LARGE_FILES)?True:False;
+   BOOL large_file_format =
+   (locktype  LOCKING_ANDX_LARGE_FILES)?True:False;
BOOL err;
BOOL my_lock_ctx = False;
NTSTATUS status;
@@ -5089,19 +5091,24 @@
/* Client can insist on breaking to none. */
BOOL break_to_none = (oplocklevel == 0);
BOOL result;
-   
-   DEBUG(5,(reply_lockingX: oplock break reply (%u) from client 
for fnum = %d\n,
-(unsigned int)oplocklevel, fsp-fnum ));
 
+   DEBUG(5,(reply_lockingX: oplock break reply (%u) from client 
+for fnum = %d\n, (unsigned int)oplocklevel,
+fsp-fnum ));
+
/*
-* Make sure we have granted an exclusive or batch oplock on 
this file.
+* Make sure we have granted an exclusive or batch oplock on
+* this file.
 */

if (fsp-oplock_type == 0) {
-   DEBUG(0,(reply_lockingX: Error : oplock break from 
client for fnum = %d (oplock=%d) and \
-no oplock granted on this file (%s).\n, fsp-fnum, fsp-oplock_type, 
fsp-fsp_name));
+   DEBUG(0,(reply_lockingX: Error : oplock break from 
+client for fnum = %d (oplock=%d) and no 
+oplock granted on this file (%s).\n,
+fsp-fnum, fsp-oplock_type, fsp-fsp_name));
 
-   /* if this is a pure oplock break request then don't 
send a reply */
+   /* if this is a pure oplock break request then don't
+* send a reply */
if (num_locks == 0  num_ulocks == 0) {
END_PROFILE(SMBlockingX);
return -1;
@@ -5127,12 +5134,14 @@
 
reply_to_oplock_break_requests(fsp);
 
-   /* if this is a pure oplock break request then don't send a 
reply */
+   /* if this is a pure oplock break request then don't send a
+* reply */
if (num_locks == 0  num_ulocks == 0) {
/* Sanity check - ensure a pure oplock break is not a
   chained request. */
if(CVAL(inbuf,smb_vwv0) != 0xff)
-   DEBUG(0,(reply_lockingX: Error : pure oplock 
break is a chained %d request !\n,
+   DEBUG(0,(reply_lockingX: Error : pure oplock 
+break is a chained %d request !\n,
 (unsigned int)CVAL(inbuf,smb_vwv0) ));
END_PROFILE(SMBlockingX);
return -1;
@@ -5161,8 +5170,9 @@
return ERROR_DOS(ERRDOS,ERRnoaccess);
}
 
-   DEBUG(10,(reply_lockingX: unlock start=%.0f, len=%.0f for pid 
%u, file %s\n,
- (double)offset, (double)count, (unsigned 
int)lock_pid, fsp-fsp_name ));
+   DEBUG(10,(reply_lockingX: unlock start=%.0f, len=%.0f for 
+ pid %u, file %s\n, (double)offset, (double)count,
+ (unsigned int)lock_pid, fsp-fsp_name ));

status = do_unlock(fsp,conn,lock_pid,count,offset);
if (NT_STATUS_V(status)) {
@@ -5194,27 +5204,34 @@
return ERROR_DOS(ERRDOS,ERRnoaccess);
}

-   DEBUG(10,(reply_lockingX: lock start=%.0f, len=%.0f for pid 
%u, file %s timeout = %d\n,
-   (double)offset, (double)count, (unsigned int)lock_pid,
-   fsp-fsp_name, (int)lock_timeout ));
+   DEBUG(10,(reply_lockingX: 

svn commit: lorikeet r381 - in trunk/sangria/src: .

2005-07-24 Thread amit
Author: amit
Date: 2005-07-24 09:33:08 + (Sun, 24 Jul 2005)
New Revision: 381

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=lorikeetrev=381

Log:
amit regmi
Modified:
   trunk/sangria/src/make_smb_conf.py
   trunk/sangria/src/smb_tools.py


Changeset:
Modified: trunk/sangria/src/make_smb_conf.py
===
--- trunk/sangria/src/make_smb_conf.py  2005-07-23 09:43:19 UTC (rev 380)
+++ trunk/sangria/src/make_smb_conf.py  2005-07-24 09:33:08 UTC (rev 381)
@@ -407,6 +407,11 @@
 print  the share is already there 
 
 def SetPathOfShare(self, shareName , pathOfShare, serverObject):
+''' set the path and include the basic permissions
+like ...
+read-only = yes
+browesable  = yes
+'''
 x = serverObject
 # check if the path exists ... If it does not ... create .. it
if( not os.path.isdir(pathOfShare)):
@@ -420,7 +425,9 @@
 x.AddService(shareToAdd , ['##','## added by modify.py ','##'])
 x.SetServiceOption(shareName , path , pathOfShare)
 x.SetServiceOption(shareName , comment ,no comment)
-x.SetServiceOption(shareName , read only ,no) 
+x.SetServiceOption(shareName , read only ,no)
+x.SetServiceOption(shareName , browesable ,yes)
+
 
 def deleteShare(self, shareToDelete , serverObject):
 ''' here we delete the share if present already in the smb.conf file 
'''

Modified: trunk/sangria/src/smb_tools.py
===
--- trunk/sangria/src/smb_tools.py  2005-07-23 09:43:19 UTC (rev 380)
+++ trunk/sangria/src/smb_tools.py  2005-07-24 09:33:08 UTC (rev 381)
@@ -49,11 +49,47 @@

 return return_str
 
+def listUnixUserAccountsInPasswd(self , pathOfPasswdFile ):
+'''
+returns a LIST of the Unix user names
+returns 0 on failure
+returns -1 on Access Denied
+'''
+
+splitted_output1 = []
+return_list1 = []
 
+if (self.Am_I_Root()):
+cmd1 = cat %s %pathOfPasswdFile
+( status1, cmd_output1 ) = commands.getstatusoutput( cmd1 )
+if status1:
+print  system error \n
+print cmd_output1
+return 0
+
+else:
+# the output obtained is a string as a whole
+splitted_output1 = string.split(cmd_output1,'\n')
+for line1 in splitted_output1:
+# again split and chuck out the first split ...
+temp1 = string.split(line1 , :)
+return_list1.append(temp1[0])
+#print temp1[0]
+
+return return_list1
+
+else:
+print  You don't have root access 
+return -1
+
+
+
 def listUserAccountsInSmbpasswd(self):
-''' returns a LIST of the user names on
-0 on failure and
 '''
+returns a LIST of the user names on Samba
+returns 0 on failure
+returns -1 on Access Denied
+'''
 
 splitted_output1 = []
 return_list1 = []
@@ -79,6 +115,7 @@
 
 else:
 print  You don't have root access 
+return -1
 
   
 
@@ -101,6 +138,7 @@
 
 else:
 print  You don't have root access 
+return -1
 
 
 def serverRefresh(self):
@@ -120,6 +158,7 @@
 return 1
 else:
 print  You don't have root access 
+return -1
 
 def SMBmountPath(self, mountSourcePath , mountDestPath , loginName , 
loginPassword):
 ''' mount a given path to a location mentioned ..
@@ -140,6 +179,7 @@
 
 else:
 print  You don't have root access 
+return -1
 
 
 def SMBumountPath(self, umountPath ):
@@ -161,8 +201,72 @@
 
 else:
 print  You don't have root access 
+return -1
 
+def addSambaAccount( self, SMBaccountID , SMBpassword ):
+
+''' it is assumed that the SMBaccountID is already there as a Unix 
User account
+here we also update the smbpasswd database so as to include each 
unix users
+as a potential accounts for samba'''
+if (self.Am_I_Root()):
 
+cmd3 = cat /etc/passwd | /usr/bin/mksmbpasswd.sh  
/etc/samba/smbpasswd
+( status3, cmd_output3 ) = commands.getstatusoutput( cmd3 )
+if status3:
+print cmd_output3
+else:
+print  /etc/samba/smbpasswd updated successfully 
+
+cmd3 = smbpasswd %s %s %(SMBaccountID, SMBpassword)
+ 

svn commit: samba r8734 - in branches/SAMBA_4_0/source/nbt_server/wins: .

2005-07-24 Thread tridge
Author: tridge
Date: 2005-07-24 12:18:11 + (Sun, 24 Jul 2005)
New Revision: 8734

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8734

Log:
fixed the wins server for the new ldb DN restrictions.

This gets it working, but I'm rather worried about the speed. We used
to get more than 5000 ops/sec, but now we are down to around 15
ops/sec. I suspect a bug in ldb.

Modified:
   branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c


Changeset:
Modified: branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c
===
--- branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c  2005-07-24 08:35:31 UTC 
(rev 8733)
+++ branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c  2005-07-24 12:18:11 UTC 
(rev 8734)
@@ -83,7 +83,32 @@
}
 }
 
+
 /*
+  return a DN for a nbt_name
+*/
+static char *winsdb_dn(TALLOC_CTX *mem_ctx, struct nbt_name *name)
+{
+   char *ret = talloc_asprintf(mem_ctx, type=%02x, name-type);
+   if (ret == NULL) {
+   return ret;
+   }
+   if (name-name  *name-name) {
+   ret = talloc_asprintf_append(ret, ,name=%s, name-name);
+   }
+   if (ret == NULL) {
+   return ret;
+   }
+   if (name-scope  *name-scope) {
+   ret = talloc_asprintf_append(ret, ,scope=%s, name-scope);
+   }
+   if (ret == NULL) {
+   return ret;
+   }
+   return ret;
+}
+
+/*
   load a WINS entry from the database
 */
 struct winsdb_record *winsdb_load(struct wins_server *winssrv, 
@@ -97,7 +122,7 @@
const char *expr;
int i;
 
-   expr = talloc_asprintf(tmp_ctx, dn=NAME=%s, nbt_name_string(tmp_ctx, 
name));
+   expr = talloc_asprintf(tmp_ctx, dn=%s, winsdb_dn(tmp_ctx, name));
if (expr == NULL) goto failed;
 
/* find the record in the WINS database */
@@ -159,8 +184,9 @@
struct ldb_message *msg = ldb_msg_new(mem_ctx);
if (msg == NULL) goto failed;
 
-   msg-dn = talloc_asprintf(msg, NAME=%s, nbt_name_string(msg, 
rec-name));
+   msg-dn = winsdb_dn(msg, rec-name);
if (msg-dn == NULL) goto failed;
+   ret |= ldb_msg_add_fmt(ldb, msg, objectClass, wins);
ret |= ldb_msg_add_fmt(ldb, msg, active, %u, rec-state);
ret |= ldb_msg_add_fmt(ldb, msg, nbFlags, 0x%04x, rec-nb_flags);
ret |= ldb_msg_add_string(ldb, msg, registeredBy, rec-registered_by);
@@ -250,7 +276,7 @@
 
winsdb_remove_version(winssrv, rec-version);
 
-   dn = talloc_asprintf(tmp_ctx, NAME=%s, nbt_name_string(tmp_ctx, 
rec-name));
+   dn = winsdb_dn(tmp_ctx, rec-name);
if (dn == NULL) goto failed;
 
ret = ldb_delete(ldb, dn);



svn commit: samba r8735 - in branches/SAMBA_4_0/source/script/tests: .

2005-07-24 Thread tridge
Author: tridge
Date: 2005-07-24 12:24:34 + (Sun, 24 Jul 2005)
New Revision: 8735

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8735

Log:
added NBT and WINS testing to 'make test' so we will know if it breaks again

Added:
   branches/SAMBA_4_0/source/script/tests/test_nbt.sh
Modified:
   branches/SAMBA_4_0/source/script/tests/selftest.sh
   branches/SAMBA_4_0/source/script/tests/tests_all.sh
   branches/SAMBA_4_0/source/script/tests/tests_quick.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/selftest.sh
===
--- branches/SAMBA_4_0/source/script/tests/selftest.sh  2005-07-24 12:18:11 UTC 
(rev 8734)
+++ branches/SAMBA_4_0/source/script/tests/selftest.sh  2005-07-24 12:24:34 UTC 
(rev 8735)
@@ -93,6 +93,7 @@
interfaces = lo*
tls enabled = $TLS_ENABLED
panic action = $SRCDIR/script/gdb_backtrace %PID% %PROG%
+   wins support = yes
 
 [tmp]
path = $TMPDIR

Added: branches/SAMBA_4_0/source/script/tests/test_nbt.sh
===
--- branches/SAMBA_4_0/source/script/tests/test_nbt.sh  2005-07-24 12:18:11 UTC 
(rev 8734)
+++ branches/SAMBA_4_0/source/script/tests/test_nbt.sh  2005-07-24 12:24:34 UTC 
(rev 8735)
@@ -0,0 +1,23 @@
+#!/bin/sh
+# test some NBT/WINS operations
+
+if [ $# -lt 1 ]; then
+cat EOF
+Usage: test_nbt.sh SERVER
+EOF
+exit 1;
+fi
+
+SERVER=$1
+
+incdir=`dirname $0`
+. $incdir/test_functions.sh
+
+SCRIPTDIR=../testprogs/ejs
+
+PATH=bin:$PATH
+export PATH
+
+for f in NBT-REGISTER NBT-WINS; do
+testit $f bin/smbtorture $TORTURE_OPTIONS //$SERVER/_none_ $f || 
failed=`expr $failed + 1`
+done


Property changes on: branches/SAMBA_4_0/source/script/tests/test_nbt.sh
___
Name: svn:executable
   + *

Modified: branches/SAMBA_4_0/source/script/tests/tests_all.sh
===
--- branches/SAMBA_4_0/source/script/tests/tests_all.sh 2005-07-24 12:18:11 UTC 
(rev 8734)
+++ branches/SAMBA_4_0/source/script/tests/tests_all.sh 2005-07-24 12:24:34 UTC 
(rev 8735)
@@ -1,5 +1,6 @@
  $SRCDIR/script/tests/test_ejs.sh localhost $USERNAME $PASSWORD || 
failed=`expr $failed + $?`
  $SRCDIR/script/tests/test_ldap.sh localhost $USERNAME $PASSWORD || 
failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_nbt.sh localhost || failed=`expr $failed + $?`
  $SRCDIR/script/tests/test_quick.sh //localhost/cifs $USERNAME $PASSWORD  || 
failed=`expr $failed + $?`
  $SRCDIR/script/tests/test_rpc.sh localhost $USERNAME $PASSWORD $DOMAIN || 
failed=`expr $failed + $?`
  $SRCDIR/script/tests/test_session_key.sh localhost $USERNAME $PASSWORD 
$DOMAIN || failed=`expr $failed + $?`

Modified: branches/SAMBA_4_0/source/script/tests/tests_quick.sh
===
--- branches/SAMBA_4_0/source/script/tests/tests_quick.sh   2005-07-24 
12:18:11 UTC (rev 8734)
+++ branches/SAMBA_4_0/source/script/tests/tests_quick.sh   2005-07-24 
12:24:34 UTC (rev 8735)
@@ -1,3 +1,5 @@
 $SRCDIR/script/tests/test_ejs.sh localhost $USERNAME $PASSWORD || failed=`expr 
$failed + $?`
 $SRCDIR/script/tests/test_ldap.sh localhost $USERNAME $PASSWORD || 
failed=`expr $failed + $?`
+$SRCDIR/script/tests/test_nbt.sh localhost || failed=`expr $failed + $?`
 $SRCDIR/script/tests/test_quick.sh //localhost/cifs $USERNAME $PASSWORD  || 
failed=`expr $failed + $?`
+



svn commit: samba r8736 - in branches/SAMBA_4_0/source/lib/ldb/ldb_tdb: .

2005-07-24 Thread tridge
Author: tridge
Date: 2005-07-24 12:38:42 + (Sun, 24 Jul 2005)
New Revision: 8736

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8736

Log:
this fixes the ldb speed (raises BENCH-WINS from 15 ops/sec to over 4000)

simo, we need to be careful to cope with this sort of direct dn query 
efficiently


Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c
===
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c  2005-07-24 
12:24:34 UTC (rev 8735)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c  2005-07-24 
12:38:42 UTC (rev 8736)
@@ -461,6 +461,13 @@
struct ltdb_private *ltdb = module-private_data;
int ret;
 
+   /* it is important that we handle dn queries this way, and not
+  via a full db search, otherwise ldb is horribly slow */
+   if (tree-operation == LDB_OP_EQUALITY 
+   ldb_attr_cmp(tree-u.equality.attr, dn) == 0) {
+   return ltdb_search_dn(module, tree-u.equality.value.data, 
attrs, res);
+   }
+
if (ltdb_lock_read(module) != 0) {
return -1;
}



svn commit: samba r8737 - in trunk/source: include locking smbd

2005-07-24 Thread vlendec
Author: vlendec
Date: 2005-07-24 13:25:16 + (Sun, 24 Jul 2005)
New Revision: 8737

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8737

Log:
Some changes to the new oplock code:

Don't store in the share mode db that we're waiting for a break, the receiving
daemon remembers a list of clients. Thus in delay_for_oplocks we don't need a
lock on the share mode db, we don't change anything.

Moved the returning the sharing violation return down to where it actually
would be returned, querying the variable second_try. Timeouts don't always
mean sharing violations. I need to find out how to correctly handle oplock
break failures next. More work in the samba4 oplock test.

Immediately reply to unexpected oplock requests to avoid races.

Volker


Modified:
   trunk/source/include/smb.h
   trunk/source/locking/locking.c
   trunk/source/smbd/open.c
   trunk/source/smbd/oplock.c


Changeset:
Sorry, the patch is too large (379 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8737


svn commit: samba r8738 - in branches/SAMBA_4_0/testprogs/ejs: .

2005-07-24 Thread abartlet
Author: abartlet
Date: 2005-07-24 22:18:01 + (Sun, 24 Jul 2005)
New Revision: 8738

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8738

Log:
Test (using ejs!) the basic operation of the ldb modules.

ejs seems to test this stuff very nicely!

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/testprogs/ejs/ldb.js


Changeset:
Modified: branches/SAMBA_4_0/testprogs/ejs/ldb.js
===
--- branches/SAMBA_4_0/testprogs/ejs/ldb.js 2005-07-24 13:25:16 UTC (rev 
8737)
+++ branches/SAMBA_4_0/testprogs/ejs/ldb.js 2005-07-24 22:18:01 UTC (rev 
8738)
@@ -6,7 +6,7 @@
 
 
 var ldb = ldb_init();
-
+var sys;
 function basic_tests(ldb)
 {
println(Running basic tests);
@@ -53,16 +53,72 @@
res = ldb.search(x=7);
assert(res.length == 1);
assert(res[0].x.length == 2);
+
+   /* Check a few things before we add modules */
+   assert(res[0].objectGUID == undefined);
+   assert(res[0].createTimestamp == undefined);
+   assert(res[0].whenCreated == undefined);
+
+}

+function setup_modules(ldb)
+{
+   ok = ldb.add(
+dn: @MODULES
[EMAIL PROTECTED]: timestamps,objectguid,rdn_name
+);
 }
 
-sys_init(ldb);
+/* Test the basic operation of the timestamps,objectguid and name_rdn
+   modules */
+
+function modules_test(ldb) 
+{
+println(Running modules tests);
+   ok = ldb.add(
+dn: cn=x8,cn=test
+objectClass: foo
+x: 8
+);
+   assert(ok);
+
+   ok = ldb.add(
+dn: cn=x9,cn=test
+objectClass: foo
+x: 9
+);
+   assert(ok);
+
+   var res = ldb.search(x=8, NULL, ldb.SCOPE_DEFAULT);
+   assert(res[0].objectGUID != undefined);
+   assert(res[0].createTimestamp != undefined);
+   assert(res[0].whenCreated != undefined);
+   assert(res[0].name == x8);
+
+   var res2 = ldb.search(x=9, NULL, ldb.SCOPE_DEFAULT);
+   assert(res2[0].objectGUID != undefined);
+   assert(res2[0].createTimestamp != undefined);
+   assert(res2[0].whenCreated != undefined);
+   assert(res2[0].name == x9);
+
+   assert(res[0].objectGUID != res2[0].objectGUID);
+
+}
+
+sys = sys_init();
 var dbfile = test.ldb;
-ldb.unlink(dbfile);
+sys.unlink(dbfile);
 var ok = ldb.connect(tdb:// + dbfile);
 assert(ok);
 
 basic_tests(ldb);
 
-ldb.unlink(dbfile);
+setup_modules(ldb);
+ldb = ldb_init();
+var ok = ldb.connect(tdb:// + dbfile);
+assert(ok);
+
+modules_test(ldb);
+
+sys.unlink(dbfile);
 return 0;



svn commit: samba r8739 - in branches/SOC/SAMBA_4_0/SAMBA_4_0/source/torture: . rpc

2005-07-24 Thread brad
Author: brad
Date: 2005-07-24 22:24:46 + (Sun, 24 Jul 2005)
New Revision: 8739

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8739

Log:
added a test called RPC-DSSYNC to config.mk
hacking at dssync.c in an attempt to make it compile
Modified:
   branches/SOC/SAMBA_4_0/SAMBA_4_0/source/torture/config.mk
   branches/SOC/SAMBA_4_0/SAMBA_4_0/source/torture/rpc/dssync.c
   branches/SOC/SAMBA_4_0/SAMBA_4_0/source/torture/torture.c


Changeset:
Modified: branches/SOC/SAMBA_4_0/SAMBA_4_0/source/torture/config.mk
===
--- branches/SOC/SAMBA_4_0/SAMBA_4_0/source/torture/config.mk   2005-07-24 
22:18:01 UTC (rev 8738)
+++ branches/SOC/SAMBA_4_0/SAMBA_4_0/source/torture/config.mk   2005-07-24 
22:24:46 UTC (rev 8739)
@@ -71,6 +71,7 @@
 # Start SUBSYSTEM TORTURE_RPC
 [SUBSYSTEM::TORTURE_RPC]
 ADD_OBJ_FILES = \
+   torture/rpc/dssync.o \
torture/rpc/lsa.o \
torture/rpc/session_key.o \
torture/rpc/echo.o \

Modified: branches/SOC/SAMBA_4_0/SAMBA_4_0/source/torture/rpc/dssync.c
===
--- branches/SOC/SAMBA_4_0/SAMBA_4_0/source/torture/rpc/dssync.c
2005-07-24 22:18:01 UTC (rev 8738)
+++ branches/SOC/SAMBA_4_0/SAMBA_4_0/source/torture/rpc/dssync.c
2005-07-24 22:24:46 UTC (rev 8739)
@@ -127,30 +127,42 @@
 {
{
const char *ldif;
-   struct ldap_message *req, *rep;
-
+   struct ldap_message *req; //, *rep;
+   NTSTATUS rtn;
+   BOOL rtn_status = False;
+   
ldif = talloc_asprintf(ctx,
dn: %s\n
changetype: delete\n,
ctx-new_dc.dc_info2.ntds_dn);
-
-   req = ldap_ldif2msg(ctx, ldif);
-
-   rep = ldap_transaction(ctx-admin.ldap.conn, req);
+   
+   //req = ldap_ldif2msg(ctx, ldif);
+   //req.messageid = ;
+   req-type = LDAP_TAG_DelRequest;
+   req-r.DelRequest.dn = ctx-new_dc.dc_info2.ntds_dn;
+   //req.num_controls = ;
+   //req.controls = ;
+   
+   
+   
+   rtn = ldap_transaction(ctx-admin.ldap.conn, req);
}
 
{
const char *ldif;
-   struct ldap_message *req, *rep;
-
+   struct ldap_message *req; //, *rep;
+   NTSTATUS rtn;
+   
ldif = talloc_asprintf(ctx,
dn: %s\n
changetype: delete\n,
ctx-new_dc.dc_info2.server_dn);
 
-   req = ldap_ldif2msg(ctx, ldif);
+   //req = ldap_ldif2msg(ctx, ldif);
+   req-type = LDAP_TAG_DelRequest;
+   req-r.DelRequest.dn = ctx-new_dc.dc_info2.ntds_dn;
 
-   rep = ldap_transaction(ctx-admin.ldap.conn, req);
+   rtn = ldap_transaction(ctx-admin.ldap.conn, req);
}
 
if (ctx-new_dc.join) {
@@ -164,12 +176,13 @@
 {
NTSTATUS status;
BOOL ret = True;
+   struct event_context *event;
 
status = dcerpc_pipe_connect_b(ctx,
   b-pipe, ctx-drsuapi_binding, 
   DCERPC_DRSUAPI_UUID,
   DCERPC_DRSUAPI_VERSION,
-  credentials);
+  credentials, event);

if (!NT_STATUS_IS_OK(status)) {
printf(Failed to connect to server as a BDC: %s\n, 
nt_errstr(status));
@@ -290,9 +303,10 @@
 {
NTSTATUS status;
const char *ldif;
-   struct ldap_message *req,*rep;
+   struct ldap_message *req; //,*rep;
BOOL ret = True;
-
+   NTSTATUS rtn;
+   
/* userAccountControl: 532480 0x82000 
 * UF_SERVER_TRUST_ACCOUNT|UF_TRUSTED_FOR_DELEGATION
 */
@@ -304,10 +318,21 @@
ctx-new_dc.dc_info2.computer_dn,
UF_SERVER_TRUST_ACCOUNT|UF_TRUSTED_FOR_DELEGATION);
 
-   req = ldap_ldif2msg(ctx, ldif);
+   //req = ldap_ldif2msg(ctx, ldif);
+   req-type = LDAP_TAG_ModifyRequest;
+   req-r.ModifyRequest.dn = ctx-new_dc.dc_info2.computer_dn;
+   req-r.ModifyRequest.num_mods = 1;
+   req-r.ModifyRequest.mods-type = LDAP_MODIFY_REPLACE;
+   req-r.ModifyRequest.mods-attrib.flags = LDB_FLAG_MOD_REPLACE;
+   req-r.ModifyRequest.mods-attrib.name = userAccountControl;
+   req-r.ModifyRequest.mods-attrib.num_values = 1;
+   req-r.ModifyRequest.mods-attrib.values-data = 
UF_SERVER_TRUST_ACCOUNT|UF_TRUSTED_FOR_DELEGATION;
+   req-r.ModifyRequest.mods-attrib.values-length = 
sizeof(req-r.ModifyRequest.mods-attrib.values-data);
+   
+// = UF_SERVER_TRUST_ACCOUNT|UF_TRUSTED_FOR_DELEGATION;
+ 

Build status as of Mon Jul 25 00:00:02 2005

2005-07-24 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2005-07-24 
00:00:07.0 +
+++ /home/build/master/cache/broken_results.txt 2005-07-25 00:00:18.0 
+
@@ -1,16 +1,16 @@
-Build status as of Sun Jul 24 00:00:02 2005
+Build status as of Mon Jul 25 00:00:02 2005
 
 Build counts:
 Tree Total  Broken Panic 
 ccache   34 7  0 
 distcc   34 5  0 
-lorikeet-heimdal 25 11 0 
-ppp  19 2  0 
+lorikeet-heimdal 23 10 0 
+ppp  20 2  0 
 rsync33 2  0 
 samba-docs   0  0  0 
-samba4   35 13 0 
-samba_3_034 8  0 
-smb-build29 4  0 
-talloc   33 13 0 
-tdb  33 15 0 
+samba4   36 13 0 
+samba_3_034 4  0 
+smb-build30 4  0 
+talloc   33 12 0 
+tdb  33 12 0 
 


svn commit: samba r8740 - in branches/SAMBA_4_0: source/dsdb/samdb/ldb_modules source/lib/ldb/modules source/setup testprogs/ejs

2005-07-24 Thread abartlet
Author: abartlet
Date: 2005-07-25 01:17:09 + (Mon, 25 Jul 2005)
New Revision: 8740

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8740

Log:
Extend the rdn_name module to handle adding the rdn as an attribute.  ie:

dn: cn=foo,ou=bar
objectClass: person

implies

dn: cn=foo,ou=bar
objectClass: person
cn: foo
(as well as a pile more default attributes)

We also correct the case in the attirbute to match that in the DN
(win2k3 behaviour) and I have a testsuite (in ejs) to prove it.

This module also found a bug in our provision.ldif, so and reduces
code complexity in the samdb module.

Andrew Bartlett


Added:
   branches/SAMBA_4_0/testprogs/ejs/ldap.js
Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c
   branches/SAMBA_4_0/source/lib/ldb/modules/rdn_name.c
   branches/SAMBA_4_0/source/setup/provision.ldif
   branches/SAMBA_4_0/testprogs/ejs/ldb.js


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c   2005-07-24 
22:24:46 UTC (rev 8739)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c   2005-07-25 
01:17:09 UTC (rev 8740)
@@ -410,17 +410,6 @@
return NULL;
}
 
-   if ((attribute = samldb_find_attribute(msg2, cn, NULL)) != NULL) {
-   if (strcasecmp(rdn-value.data, attribute-values[0].data) != 
0) {
-   ldb_debug(module-ldb, LDB_DEBUG_FATAL, 
samldb_fill_group_object: Bad Attribute Syntax for CN\n);
-   return NULL;
-   }
-   } else { /* FIXME: remove this if ldb supports natively aliasing 
between the rdn and the cn attribute */
-   if ( ldb_msg_add_value(module-ldb, msg2, cn, rdn-value)) {
-   return NULL;
-   }
-   }
-
if ((attribute = samldb_find_attribute(msg2, objectSid, NULL)) == 
NULL ) {
struct dom_sid *sid = samldb_get_new_sid(module, msg2, 
msg2-dn);
if (sid == NULL) {
@@ -481,7 +470,7 @@
return NULL;
}
if (strcasecmp(rdn-name, cn) != 0) {
-   ldb_debug(module-ldb, LDB_DEBUG_FATAL, 
samldb_fill_user_or_computer_object: Bad RDN (%s) for group!\n, rdn-name);
+   ldb_debug(module-ldb, LDB_DEBUG_FATAL, 
samldb_fill_user_or_computer_object: Bad RDN (%s) for user/computer!\n, 
rdn-name);
return NULL;
}
 
@@ -490,17 +479,6 @@
return NULL;
}
 
-   if ((attribute = samldb_find_attribute(msg2, cn, NULL)) != NULL) {
-   if (strcasecmp(rdn-value.data, attribute-values[0].data) != 
0) {
-   ldb_debug(module-ldb, LDB_DEBUG_FATAL, 
samldb_fill_group_object: Bad Attribute Syntax for CN\n);
-   return NULL;
-   }
-   } else { /* FIXME: remove this if ldb supports natively aliasing 
between the rdn and the cn attribute */
-   if ( ldb_msg_add_value(module-ldb, msg2, cn, rdn-value)) {
-   return NULL;
-   }
-   }
-
if ((attribute = samldb_find_attribute(msg2, objectSid, NULL)) == 
NULL ) {
struct dom_sid *sid;
sid = samldb_get_new_sid(module, msg2, msg2-dn);

Modified: branches/SAMBA_4_0/source/lib/ldb/modules/rdn_name.c
===
--- branches/SAMBA_4_0/source/lib/ldb/modules/rdn_name.c2005-07-24 
22:24:46 UTC (rev 8739)
+++ branches/SAMBA_4_0/source/lib/ldb/modules/rdn_name.c2005-07-25 
01:17:09 UTC (rev 8740)
@@ -88,10 +88,12 @@
 /* add_record: add crateTimestamp/modifyTimestamp attributes */
 static int rdn_name_add_record(struct ldb_module *module, const struct 
ldb_message *msg)
 {
+   struct private_data *data = (struct private_data *)module-private_data;
+
struct ldb_message *msg2;
struct ldb_message_element *attribute;
struct ldb_dn_component *rdn;
-   int ret, i;
+   int i, ret;
 
ldb_debug(module-ldb, LDB_DEBUG_TRACE, rdn_name_add_record\n);
 
@@ -126,6 +128,29 @@
return -1;
}
 
+   attribute = rdn_name_find_attribute(msg2, rdn-name);
+
+   if (!attribute) {
+   if (ldb_msg_add_value(module-ldb, msg2, rdn-name, 
rdn-value) != 0) {
+   return -1;
+   }
+   } else {
+   const struct ldb_attrib_handler *handler
+   = ldb_attrib_handler(module-ldb, rdn-name);
+   for (i=0; i  attribute-num_values; i++) {
+   if (handler-comparison_fn(module-ldb, msg2, 
rdn-value, attribute-values[i]) == 0) {
+   /* overwrite so it matches in case */
+   attribute-values[i] = rdn-value;
+   break;
+   }
+  

svn commit: samba r8741 - in branches/SAMBA_4_0/source/libnet: .

2005-07-24 Thread abartlet
Author: abartlet
Date: 2005-07-25 01:19:16 + (Mon, 25 Jul 2005)
New Revision: 8741

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8741

Log:
Kill warnings about enums not fully enumerated, as we will never use
all the branches.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/libnet/libnet_vampire.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_vampire.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_vampire.c   2005-07-25 01:17:09 UTC 
(rev 8740)
+++ branches/SAMBA_4_0/source/libnet/libnet_vampire.c   2005-07-25 01:19:16 UTC 
(rev 8741)
@@ -158,6 +158,8 @@
   error_string);
break;
}
+   default:
+   break;
}
return nt_status;
 }
@@ -395,6 +397,9 @@
  delta);
break;
}
+   default:
+   /* Can't dump them all right now */
+   break;
}
return nt_status;
 }



svn commit: samba r8742 - in branches/SAMBA_4_0/source/scripting/ejs: .

2005-07-24 Thread tridge
Author: tridge
Date: 2005-07-25 02:23:04 + (Mon, 25 Jul 2005)
New Revision: 8742

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8742

Log:
fixed handling of zero length names in mprObject()

Modified:
   branches/SAMBA_4_0/source/scripting/ejs/mprutil.c


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/mprutil.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/mprutil.c   2005-07-25 01:19:16 UTC 
(rev 8741)
+++ branches/SAMBA_4_0/source/scripting/ejs/mprutil.c   2005-07-25 02:23:04 UTC 
(rev 8742)
@@ -29,7 +29,7 @@
 */
 struct MprVar mprObject(const char *name)
 {
-   return ejsCreateObj(name?name:(NULL), MPR_DEFAULT_HASH_SIZE);
+   return ejsCreateObj(name  *name?name:(NULL), MPR_DEFAULT_HASH_SIZE);
 }
 
 /*



svn commit: samba r8743 - in branches/SAMBA_4_0/testprogs/ejs: .

2005-07-24 Thread tridge
Author: tridge
Date: 2005-07-25 02:23:27 + (Mon, 25 Jul 2005)
New Revision: 8743

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8743

Log:
automatically find the basedn in ldap.js


Modified:
   branches/SAMBA_4_0/testprogs/ejs/ldap.js


Changeset:
Modified: branches/SAMBA_4_0/testprogs/ejs/ldap.js
===
--- branches/SAMBA_4_0/testprogs/ejs/ldap.js2005-07-25 02:23:04 UTC (rev 
8742)
+++ branches/SAMBA_4_0/testprogs/ejs/ldap.js2005-07-25 02:23:27 UTC (rev 
8743)
@@ -17,13 +17,12 @@
return -1;
 }
 
-if (options.ARGV.length != 2) {
-   println(Usage: ldap.js BASEDN HOST);
+if (options.ARGV.length != 1) {
+   println(Usage: ldap.js HOST);
return -1;
 }
 
-var base_dn = options.ARGV[0];
-var host = options.ARGV[1];
+var host = options.ARGV[0];
 
 function basic_tests(ldb, base_dn)
 {
@@ -50,7 +49,17 @@
 
 }
 
+function find_basedn(ldb)
+{
+var attrs = new Array(defaultNamingContext);
+var res = ldb.search(, , ldb.SCOPE_BASE, attrs);
+assert(res.length == 1);
+return res[0].defaultNamingContext;
+}
+
 var ok = ldb.connect(ldap://; + host);
+var base_dn = find_basedn(ldb);
+
 basic_tests(ldb, base_dn)
 
 return 0;



svn commit: samba r8744 - in branches/SAMBA_4_0/source: include libnet

2005-07-24 Thread abartlet
Author: abartlet
Date: 2005-07-25 02:23:41 + (Mon, 25 Jul 2005)
New Revision: 8744

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8744

Log:
Split 'net samdump' out into a separate file

Work on the talloc memory tree, as I think talloc_reference and other
things were biting me.  

Crush unions in the name of code reform. ;-)

Andrew Bartlett

Added:
   branches/SAMBA_4_0/source/libnet/libnet_samdump.c
Modified:
   branches/SAMBA_4_0/source/include/structs.h
   branches/SAMBA_4_0/source/libnet/config.mk
   branches/SAMBA_4_0/source/libnet/libnet_vampire.c
   branches/SAMBA_4_0/source/libnet/libnet_vampire.h


Changeset:
Sorry, the patch is too large (711 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8744


svn commit: samba r8746 - in branches/SAMBA_4_0/source: . build/tests lib/replace lib/replace/repdir

2005-07-24 Thread tridge
Author: tridge
Date: 2005-07-25 04:03:01 + (Mon, 25 Jul 2005)
New Revision: 8746

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8746

Log:
replace opendir/readdir/telldir/seekdir/closedir on systems where they
are broken (apparently all BSD systems). This breakage leads to unlink
on files in an open directory causing a later seekdir to miss
files. The bug happens due to a block boundary bug in the BSD libc
implementation of these calls.

This replacement code also fixes a severe memory usage problem with
telldir that can cause closedir() to take an arbitrary amount of time.

I have reported the bug in readdir to Greg Lehey (a FreeBSD maintainer)

Added:
   branches/SAMBA_4_0/source/build/tests/os2_delete.c
   branches/SAMBA_4_0/source/lib/replace/repdir/
   branches/SAMBA_4_0/source/lib/replace/repdir/config.m4
   branches/SAMBA_4_0/source/lib/replace/repdir/repdir.c
Modified:
   branches/SAMBA_4_0/source/configure.in
   branches/SAMBA_4_0/source/lib/replace/config.mk


Changeset:
Sorry, the patch is too large (321 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8746


svn commit: samba r8747 - in branches/SAMBA_4_0/source/lib: .

2005-07-24 Thread tridge
Author: tridge
Date: 2005-07-25 04:03:22 + (Mon, 25 Jul 2005)
New Revision: 8747

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8747

Log:
remove unused code

Removed:
   branches/SAMBA_4_0/source/lib/ldap_escape.c


Changeset:
Deleted: branches/SAMBA_4_0/source/lib/ldap_escape.c
===
--- branches/SAMBA_4_0/source/lib/ldap_escape.c 2005-07-25 04:03:01 UTC (rev 
8746)
+++ branches/SAMBA_4_0/source/lib/ldap_escape.c 2005-07-25 04:03:22 UTC (rev 
8747)
@@ -1,90 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   ldap filter argument escaping
-
-   Copyright (C) 1998, 1999, 2000 Luke Howard [EMAIL PROTECTED],
-   Copyright (C) 2003 Andrew Bartlett [EMAIL PROTECTED]
-
-  
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include includes.h
-
-/**
- * Escape a parameter to an LDAP filter string, so they cannot contain
- * embeded ( ) * or \ chars which may cause it not to parse correctly. 
- *
- * @param s The input string
- *
- * @return A string allocated with malloc(), containing the escaped string, 
- * and to be free()ed by the caller.
- **/
-
-char *escape_ldap_string_alloc(const char *s)
-{
-   size_t len = strlen(s)+1;
-   char *output = malloc(len);
-   char *output_tmp;
-   const char *sub;
-   int i = 0;
-   char *p = output;
-   
-   while (*s)
-   {
-   switch (*s)
-   {
-   case '*':
-   sub = \\2a;
-   break;
-   case '(':
-   sub = \\28;
-   break;
-   case ')':
-   sub = \\29;
-   break;
-   case '\\':
-   sub = \\5c;
-   break;
-   default:
-   sub = NULL;
-   break;
-   }
-   
-   if (sub) {
-   len = len + 3;
-   output_tmp = realloc(output, len);
-   if (!output_tmp) { 
-   SAFE_FREE(output);
-   return NULL;
-   }
-   output = output_tmp;
-   
-   p = output[i];
-   strncpy (p, sub, 3);
-   p += 3;
-   i += 3;
-
-   } else {
-   *p = *s;
-   p++;
-   i++;
-   }
-   s++;
-   }
-   
-   *p = '\0';
-   return output;
-}



svn commit: samba r8748 - in branches/SAMBA_4_0/source/utils/net: .

2005-07-24 Thread tridge
Author: tridge
Date: 2005-07-25 04:15:57 + (Mon, 25 Jul 2005)
New Revision: 8748

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8748

Log:
fixed build. Andrew, please check.


Modified:
   branches/SAMBA_4_0/source/utils/net/net_vampire.c


Changeset:
Modified: branches/SAMBA_4_0/source/utils/net/net_vampire.c
===
--- branches/SAMBA_4_0/source/utils/net/net_vampire.c   2005-07-25 04:03:22 UTC 
(rev 8747)
+++ branches/SAMBA_4_0/source/utils/net/net_vampire.c   2005-07-25 04:15:57 UTC 
(rev 8748)
@@ -29,7 +29,7 @@
 {
NTSTATUS status;
struct libnet_context *libnetctx;
-   union libnet_SamDump r;
+   struct libnet_SamDump r;
 
libnetctx = libnet_context_init(NULL);
if (!libnetctx) {
@@ -37,16 +37,14 @@
}
libnetctx-cred = ctx-credentials;
 
-   /* prepare password change */
-   r.generic.level= LIBNET_SAMDUMP_GENERIC;
-   r.generic.error_string = NULL;
+   r.level= LIBNET_SAMDUMP_GENERIC;
+   r.error_string = NULL;
 
-   /* do the domain join */
status = libnet_SamDump(libnetctx, ctx-mem_ctx, r);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,(libnet_SamDump returned %s: %s\n,
 nt_errstr(status),
-r.generic.error_string));
+r.error_string));
return -1;
}
 



svn commit: samba r8749 - in branches/SAMBA_4_0/source/lib/replace/repdir: .

2005-07-24 Thread tridge
Author: tridge
Date: 2005-07-25 04:34:14 + (Mon, 25 Jul 2005)
New Revision: 8749

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8749

Log:
for completeness, add rewinddir() and dirfd()


Modified:
   branches/SAMBA_4_0/source/lib/replace/repdir/repdir.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/repdir/repdir.c
===
--- branches/SAMBA_4_0/source/lib/replace/repdir/repdir.c   2005-07-25 
04:15:57 UTC (rev 8748)
+++ branches/SAMBA_4_0/source/lib/replace/repdir/repdir.c   2005-07-25 
04:34:14 UTC (rev 8749)
@@ -125,6 +125,11 @@
}
 }
 
+void rewinddir(DIR *dir)
+{
+   seekdir(dir, 0);
+}
+
 int closedir(DIR *dir)
 {
struct dir_buf *d = (struct dir_buf *)dir;
@@ -136,3 +141,8 @@
return 0;
 }
 
+int dirfd(DIR *dir)
+{
+   struct dir_buf *d = (struct dir_buf *)dir;
+   return d-fd;
+}



svn commit: samba r8750 - in branches/SAMBA_4_0/source/lib/replace/repdir: .

2005-07-24 Thread tridge
Author: tridge
Date: 2005-07-25 04:39:20 + (Mon, 25 Jul 2005)
New Revision: 8750

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8750

Log:
drat, on some systems dirfd() is a macro



Modified:
   branches/SAMBA_4_0/source/lib/replace/repdir/repdir.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/repdir/repdir.c
===
--- branches/SAMBA_4_0/source/lib/replace/repdir/repdir.c   2005-07-25 
04:34:14 UTC (rev 8749)
+++ branches/SAMBA_4_0/source/lib/replace/repdir/repdir.c   2005-07-25 
04:39:20 UTC (rev 8750)
@@ -141,8 +141,11 @@
return 0;
 }
 
+#ifndef dirfd
+/* darn, this is a macro on some systems. */
 int dirfd(DIR *dir)
 {
struct dir_buf *d = (struct dir_buf *)dir;
return d-fd;
 }
+#endif



svn commit: samba r8751 - in branches/SOC/SAMBA_3_0/source/client: .

2005-07-24 Thread kalim
Author: kalim
Date: 2005-07-25 05:30:40 + (Mon, 25 Jul 2005)
New Revision: 8751

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=8751

Log:
Added initialization stuff for libsmb
'cd' command updated

-kalim
Modified:
   branches/SOC/SAMBA_3_0/source/client/client.c


Changeset:
Modified: branches/SOC/SAMBA_3_0/source/client/client.c
===
--- branches/SOC/SAMBA_3_0/source/client/client.c   2005-07-25 04:39:20 UTC 
(rev 8750)
+++ branches/SOC/SAMBA_3_0/source/client/client.c   2005-07-25 05:30:40 UTC 
(rev 8751)
@@ -5,6 +5,7 @@
Copyright (C) Simo Sorce   2001-2002
Copyright (C) Jelmer Vernooij  2003
Copyright (C) Gerald (Jerry) Carter2004
+   Copyright (C) Kalim Moghul 2005

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
@@ -23,8 +24,10 @@
 
 #define NO_SYSLOG
 
-#include includes.h
+#include includes.h
+#include libsmbclient.h
 #include client/client_proto.h
+#include client/get_auth_data_fn.h
 #ifndef REGISTER
 #define REGISTER 0
 #endif
@@ -35,7 +38,7 @@
 extern BOOL in_client;
 static int port = 0;
 pstring cur_dir = \\;
-static pstring cd_path = ;
+//static pstring cd_path = ;
 static pstring service;
 static pstring desthost;
 static pstring username;
@@ -258,33 +261,60 @@
struct cli_state *targetcli;
SMB_STRUCT_STAT sbuf;
uint32 attributes;
+int dh;
int ret = 1;
-  
-   dos_format(newdir);
+
+   unix_format(newdir);
 
/* Save the current directory in case the new directory is invalid */
 
pstrcpy(saved_dir, cur_dir);
 
-   if (*p == '\\')
+   if (*p == '/')
pstrcpy(cur_dir,p);
else
pstrcat(cur_dir,p);
 
-   if (*(cur_dir+strlen(cur_dir)-1) != '\\') {
-   pstrcat(cur_dir, \\);
+   if (*(cur_dir+strlen(cur_dir)-1) != '/') {
+   pstrcat(cur_dir, /);
}

-   dos_clean_name(cur_dir);
+/*dos_clean_name(cur_dir);
pstrcpy( dname, cur_dir );
pstrcat(cur_dir,\\);
-   dos_clean_name(cur_dir);
-   
-   if ( !cli_resolve_path( , cli, dname, targetcli, targetpath ) ) {
+   dos_clean_name(cur_dir);*/
+
+
+/* TODO: cleanup debugging print statements*/
+/*d_printf(service: %s\n, service);
+d_printf(desthost: %s\n, desthost);
+d_printf(username: %s\n, username);
+d_printf(calling_name: %s\n, calling_name);
+d_printf(cur_dir: %s\n, cur_dir);*/
+
+/* Format the directory in a libmsmbclient friendly way */
+unix_clean_name(cur_dir);
+   pstrcpy( dname, cur_dir );
+pstrcpy(targetpath, smb:);
+pstrcat(targetpath, service);
+   pstrcat(targetpath, dname);
+unix_format(targetpath);
+/*d_printf(Saved: %s\n, cur_dir);
+d_printf(Result: %s\n, targetpath);*/
+
+   /*if ( !cli_resolve_path( , cli, dname, targetcli, targetpath ) ) {
d_printf(cd %s: %s\n, dname, cli_errstr(cli));
pstrcpy(cur_dir,saved_dir);
goto out;
-   }
+   }*/
+dh = smbc_opendir(targetpath);
+if (dh  0)
+{
+d_printf(%s changing to directory %s\n, strerror(errno), cur_dir);
+pstrcpy(cur_dir, saved_dir);
+return 1;
+}
+smbc_closedir(dh);
 

if ( strequal(targetpath,\\ ) )
@@ -292,7 +322,7 @@

/* use a trans2_qpathinfo to test directories for modern servers */

-   if ( targetcli-protocol = PROTOCOL_LANMAN2 ) {
+   /*if ( targetcli-protocol = PROTOCOL_LANMAN2 ) {
if ( !cli_qpathinfo_basic( targetcli, targetpath, sbuf, 
attributes ) ) {
d_printf(cd %s: %s\n, dname, cli_errstr(targetcli));
pstrcpy(cur_dir,saved_dir);
@@ -313,13 +343,11 @@
pstrcpy(cur_dir,saved_dir);
goto out;
}
-   }
+   }*/
 
ret = 0;
 
 out:
-   
-   pstrcpy(cd_path,cur_dir);
return ret;
 }
 
@@ -2427,7 +2455,6 @@

if (next_token_nr(NULL,buf,NULL,sizeof(buf)))
chdir(buf);
-d_printf(Local directory now %s\n, sys_getwd(d));
DEBUG(2,(the local directory is now %s\n,sys_getwd(d)));
 
return 0;
@@ -2714,6 +2741,8 @@
   {history,cmd_history,displays the command 
history,{COMPL_NONE,COMPL_NONE}},
   {lcd,cmd_lcd,[directory] change/report the local current working 
directory,{COMPL_LOCAL,COMPL_NONE}},
   {link,cmd_link,oldname newname create a UNIX hard 
link,{COMPL_REMOTE,COMPL_REMOTE}},
+  {listconnect,cmd_list_connect,list open 
connections,{COMPL_NONE,COMPL_NONE}},
+  {logon,cmd_logon,establish new logon,{COMPL_NONE,COMPL_NONE}},
   {lowercase,cmd_lowercase,toggle lowercasing of filenames for