summaryrefslogtreecommitdiffstats
path: root/source/libsmb/clirap.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix make test on sparc and possibly also on AIXVolker Lendecke2008-09-091-1/+3
|
* Convert cli_qfileinfo to the async trans callVolker Lendecke2008-09-091-21/+19
|
* Fix a memleak in cli_qfilename (only used in smbtorture)Volker Lendecke2008-09-091-0/+5
|
* Fix some signed/unsigned warningsVolker Lendecke2008-05-201-1/+1
|
* Cleanup size_t return values in callers of convert_string_allocateTim Prouty2008-05-201-6/+6
| | | | | This patch is the second iteration of an inside-out conversion to cleanup functions in charcnv.c returning size_t == -1 to indicate failure.
* Fix bug reported on IRC enumerating shares with OS/2.Jeremy Allison2008-02-081-3/+4
| | | | | Report and fix from kukks (thanks once again !). Jeremy.
* Add the "allinfo" command to smbclientVolker Lendecke2008-01-181-0/+131
| | | | Modeled after the Samba4 allinfo command
* Fix a memleak found by the IBM checker.Michael Adam2008-01-091-0/+1
| | | | Michael
* Support fetching very long server lists with RAP_NetServerEnum3.James Peach2007-12-091-42/+125
| | | | | | | Use the RAP_NetServerEnum3 server list continuation API for retrieving server lists that are too long to fit in a single reply. Patch from George Colley <gcolley@apple.com>.
* Fix C++ warningsVolker Lendecke2007-12-081-4/+4
|
* Remove arbitrary 1k limit on pathnames. Malloc them.Jeremy Allison2007-12-051-31/+66
| | | | Jeremy.
* Remove pstring from clirap.c.Jeremy Allison2007-11-301-118/+187
| | | | Jeremy.
* Remove the explicit TALLOC_CTX * from cli_struct.Jeremy Allison2007-11-291-1/+1
| | | | | | Make us very explicit about how long a talloc ctx should last. Jeremy.
* Always check return from push_ascii.Jeremy Allison2007-11-191-1/+6
| | | | Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-15/+15
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r22045: As Volker noticed, skip_string's last argument isJeremy Allison2007-10-101-9/+9
| | | | | redundent. Remove it. Jeremy.
* r22014: Make us pass RANDOMIPC test again :-(. This is an ugly check-in,Jeremy Allison2007-10-101-9/+9
| | | | | but I've no option. Jeremy.
* r22001: change prototype of dump_data(), so that it takes unsigned char * now,Stefan Metzmacher2007-10-101-1/+1
| | | | | | | | which matches what samba4 has. also fix all the callers to prevent compiler warnings metze
* r21864: Reformatting.Jeremy Allison2007-10-101-92/+92
| | | | Jeremy.
* r21768: Fix the client dfs code such that smbclient canJeremy Allison2007-10-101-11/+5
| | | | | | | | | process deep dfs links (ie. links that go to non root parts of a share). Make the directory handling conanonical in POSIX and Windows pathname processing. dfs should not be fully working in client tools. Please bug me if not. Jeremy.
* r19231: I encountered a WinXP/Home system which, acting as the master ↵Derrell Lipman2007-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | browser for its workgroup, decided periodically to stop sending recognized responses to a NetServerEnum2 request for the workgroup. Instead of returning the list of servers (only itself; nothing else in the workgroup), it returns a status code of 8 which is unsupported by samba3, samba4, and ethereal. The code for this request assumed that if an unexpected status code was received, the connection had a problem, i.e. that cli_errno() would show a problem. That turns out not to be the case. This patch changes the behavior so tha any time a response is received and cli_errno() == 0, we continue processing the reply and base our response on the returned count (zero). The pre-existing code then converts this count=0 into an ENOENT errno which can be properly handled by the application (whereas an error return with errno=0 can't be). This packet dump has only 2 frames. Sorry about the text version but it's most easily attached to this log message. I also have it saved as .pcap if anyone wants it. Derrell No. Time Source Destination Protocol Info 1 14:31:59.802668 192.168.1.106 192.168.1.100 LANMAN NetServerEnum2 Request, Server, SQL Server, Domain Controller, Backup Controller, Time Source, Apple Server, Novell Server, Domain Member Server, Print Queue Server, Dialin Server, Xenix Server, NT Workstation, Windows for Workgroups, Unknown server type:14, NT Server Frame 1 (196 bytes on wire, 196 bytes captured) Arrival Time: Oct 10, 2006 14:31:59.802668000 Time delta from previous packet: 0.000000000 seconds Time since reference or first frame: 0.000000000 seconds Frame Number: 1 Packet Length: 196 bytes Capture Length: 196 bytes Protocols in frame: eth:ip:tcp:nbss:smb Ethernet II, Src: IntelCor_4a:47:bb (00:13:20:4a:47:bb), Dst: Micro-St_74:16:e7 (00:0c:76:74:16:e7) Destination: Micro-St_74:16:e7 (00:0c:76:74:16:e7) Source: IntelCor_4a:47:bb (00:13:20:4a:47:bb) Type: IP (0x0800) Internet Protocol, Src: 192.168.1.106 (192.168.1.106), Dst: 192.168.1.100 (192.168.1.100) Version: 4 Header length: 20 bytes Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00) 0000 00.. = Differentiated Services Codepoint: Default (0x00) .... ..0. = ECN-Capable Transport (ECT): 0 .... ...0 = ECN-CE: 0 Total Length: 182 Identification: 0xb838 (47160) Flags: 0x04 (Don't Fragment) 0... = Reserved bit: Not set .1.. = Don't fragment: Set ..0. = More fragments: Not set Fragment offset: 0 Time to live: 64 Protocol: TCP (0x06) Header checksum: 0xfdea [correct] Good: True Bad : False Source: 192.168.1.106 (192.168.1.106) Destination: 192.168.1.100 (192.168.1.100) Transmission Control Protocol, Src Port: 44932 (44932), Dst Port: netbios-ssn (139), Seq: 851982066, Ack: 1274726157, Len: 130 Source port: 44932 (44932) Destination port: netbios-ssn (139) Sequence number: 851982066 Next sequence number: 851982196 Acknowledgement number: 1274726157 Header length: 32 bytes Flags: 0x0018 (PSH, ACK) 0... .... = Congestion Window Reduced (CWR): Not set .0.. .... = ECN-Echo: Not set ..0. .... = Urgent: Not set ...1 .... = Acknowledgment: Set .... 1... = Push: Set .... .0.. = Reset: Not set .... ..0. = Syn: Not set .... ...0 = Fin: Not set Window size: 6432 Checksum: 0xb4e0 [correct] Options: (12 bytes) NOP NOP Time stamp: tsval 1184074739, tsecr 11576161 NetBIOS Session Service Message Type: Session message Flags: 0x00 .... ...0 = Add 0 to length Length: 126 SMB (Server Message Block Protocol) SMB Header Server Component: SMB Response in: 2 SMB Command: Trans (0x25) NT Status: STATUS_SUCCESS (0x00000000) Flags: 0x08 0... .... = Request/Response: Message is a request to the server .0.. .... = Notify: Notify client only on open ..0. .... = Oplocks: OpLock not requested/granted ...0 .... = Canonicalized Pathnames: Pathnames are not canonicalized .... 1... = Case Sensitivity: Path names are caseless .... ..0. = Receive Buffer Posted: Receive buffer has not been posted .... ...0 = Lock and Read: Lock&Read, Write&Unlock are not supported Flags2: 0xc801 1... .... .... .... = Unicode Strings: Strings are Unicode .1.. .... .... .... = Error Code Type: Error codes are NT error codes ..0. .... .... .... = Execute-only Reads: Don't permit reads if execute-only ...0 .... .... .... = Dfs: Don't resolve pathnames with Dfs .... 1... .... .... = Extended Security Negotiation: Extended security negotiation is supported .... .... .0.. .... = Long Names Used: Path names in request are not long file names .... .... .... .0.. = Security Signatures: Security signatures are not supported .... .... .... ..0. = Extended Attributes: Extended attributes are not supported .... .... .... ...1 = Long Names Allowed: Long file names are allowed in the response Process ID High: 0 Signature: 0000000000000000 Reserved: 0000 Tree ID: 2048 Process ID: 12967 User ID: 2048 Multiplex ID: 6 Trans Request (0x25) Word Count (WCT): 14 Total Parameter Count: 36 Total Data Count: 0 Max Parameter Count: 8 Max Data Count: 65535 Max Setup Count: 0 Reserved: 00 Flags: 0x0000 .... .... .... ..0. = One Way Transaction: Two way transaction .... .... .... ...0 = Disconnect TID: Do NOT disconnect TID Timeout: Return immediately (0) Reserved: 0000 Parameter Count: 36 Parameter Offset: 90 Data Count: 0 Data Offset: 126 Setup Count: 0 Reserved: 00 Byte Count (BCC): 63 Transaction Name: \PIPE\LANMAN SMB Pipe Protocol Microsoft Windows Lanman Remote API Protocol Function Code: NetServerEnum2 (104) Parameter Descriptor: WrLehDz Return Descriptor: B16BBDz Detail Level: 1 Receive Buffer Length: 65535 Server Type: 0x0000fffe .... .... .... .... .... .... .... ...0 = Workstation: This is NOT a Workstation .... .... .... .... .... .... .... ..1. = Server: This is a Server .... .... .... .... .... .... .... .1.. = SQL: This is an SQL server .... .... .... .... .... .... .... 1... = Domain Controller: This is a Domain Controller .... .... .... .... .... .... ...1 .... = Backup Controller: This is a Backup Controller .... .... .... .... .... .... ..1. .... = Time Source: This is a Time Source .... .... .... .... .... .... .1.. .... = Apple: This is an Apple host .... .... .... .... .... .... 1... .... = Novell: This is a Novell server .... .... .... .... .... ...1 .... .... = Member: This is a Domain Member server .... .... .... .... .... ..1. .... .... = Print: This is a Print Queue server .... .... .... .... .... .1.. .... .... = Dialin: This is a Dialin server .... .... .... .... .... 1... .... .... = Xenix: This is a Xenix server .... .... .... .... ...1 .... .... .... = NT Workstation: This is an NT Workstation .... .... .... .... ..1. .... .... .... = WfW: This is a WfW host .... .... .... .... 1... .... .... .... = NT Server: This is an NT Server .... .... .... ...0 .... .... .... .... = Potential Browser: This is NOT a Potential Browser .... .... .... ..0. .... .... .... .... = Backup Browser: This is NOT a Backup Browser .... .... .... .0.. .... .... .... .... = Master Browser: This is NOT a Master Browser .... .... .... 0... .... .... .... .... = Domain Master Browser: This is NOT a Domain Master Browser .... .... ...0 .... .... .... .... .... = OSF: This is NOT an OSF host .... .... ..0. .... .... .... .... .... = VMS: This is NOT a VMS host .... .... .0.. .... .... .... .... .... = Windows 95+: This is NOT a Windows 95 or above host .0.. .... .... .... .... .... .... .... = Local: This is NOT a local list only request 0... .... .... .... .... .... .... .... = Domain Enum: This is NOT a Domain Enum request Enumeration Domain: WORKGROUP No. Time Source Destination Protocol Info 2 14:31:59.803918 192.168.1.100 192.168.1.106 LANMAN NetServerEnum2 Response Frame 2 (134 bytes on wire, 134 bytes captured) Arrival Time: Oct 10, 2006 14:31:59.803918000 Time delta from previous packet: 0.001250000 seconds Time since reference or first frame: 0.001250000 seconds Frame Number: 2 Packet Length: 134 bytes Capture Length: 134 bytes Protocols in frame: eth:ip:tcp:nbss:smb Ethernet II, Src: Micro-St_74:16:e7 (00:0c:76:74:16:e7), Dst: IntelCor_4a:47:bb (00:13:20:4a:47:bb) Destination: IntelCor_4a:47:bb (00:13:20:4a:47:bb) Source: Micro-St_74:16:e7 (00:0c:76:74:16:e7) Type: IP (0x0800) Internet Protocol, Src: 192.168.1.100 (192.168.1.100), Dst: 192.168.1.106 (192.168.1.106) Version: 4 Header length: 20 bytes Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00) 0000 00.. = Differentiated Services Codepoint: Default (0x00) .... ..0. = ECN-Capable Transport (ECT): 0 .... ...0 = ECN-CE: 0 Total Length: 120 Identification: 0xea10 (59920) Flags: 0x04 (Don't Fragment) 0... = Reserved bit: Not set .1.. = Don't fragment: Set ..0. = More fragments: Not set Fragment offset: 0 Time to live: 128 Protocol: TCP (0x06) Header checksum: 0x8c50 [correct] Good: True Bad : False Source: 192.168.1.100 (192.168.1.100) Destination: 192.168.1.106 (192.168.1.106) Transmission Control Protocol, Src Port: netbios-ssn (139), Dst Port: 44932 (44932), Seq: 1274726157, Ack: 851982196, Len: 68 Source port: netbios-ssn (139) Destination port: 44932 (44932) Sequence number: 1274726157 Next sequence number: 1274726225 Acknowledgement number: 851982196 Header length: 32 bytes Flags: 0x0018 (PSH, ACK) 0... .... = Congestion Window Reduced (CWR): Not set .0.. .... = ECN-Echo: Not set ..0. .... = Urgent: Not set ...1 .... = Acknowledgment: Set .... 1... = Push: Set .... .0.. = Reset: Not set .... ..0. = Syn: Not set .... ...0 = Fin: Not set Window size: 64606 Checksum: 0x1e0d [correct] Options: (12 bytes) NOP NOP Time stamp: tsval 11576161, tsecr 1184074739 NetBIOS Session Service Message Type: Session message Flags: 0x00 .... ...0 = Add 0 to length Length: 64 SMB (Server Message Block Protocol) SMB Header Server Component: SMB Response to: 1 Time from request: 0.001250000 seconds SMB Command: Trans (0x25) NT Status: STATUS_SUCCESS (0x00000000) Flags: 0x88 1... .... = Request/Response: Message is a response to the client/redirector .0.. .... = Notify: Notify client only on open ..0. .... = Oplocks: OpLock not requested/granted ...0 .... = Canonicalized Pathnames: Pathnames are not canonicalized .... 1... = Case Sensitivity: Path names are caseless .... ..0. = Receive Buffer Posted: Receive buffer has not been posted .... ...0 = Lock and Read: Lock&Read, Write&Unlock are not supported Flags2: 0xc801 1... .... .... .... = Unicode Strings: Strings are Unicode .1.. .... .... .... = Error Code Type: Error codes are NT error codes ..0. .... .... .... = Execute-only Reads: Don't permit reads if execute-only ...0 .... .... .... = Dfs: Don't resolve pathnames with Dfs .... 1... .... .... = Extended Security Negotiation: Extended security negotiation is supported .... .... .0.. .... = Long Names Used: Path names in request are not long file names .... .... .... .0.. = Security Signatures: Security signatures are not supported .... .... .... ..0. = Extended Attributes: Extended attributes are not supported .... .... .... ...1 = Long Names Allowed: Long file names are allowed in the response Process ID High: 0 Signature: 0000000000000000 Reserved: 0000 Tree ID: 2048 Process ID: 12967 User ID: 2048 Multiplex ID: 6 Trans Response (0x25) Word Count (WCT): 10 Total Parameter Count: 8 Total Data Count: 0 Reserved: 0000 Parameter Count: 8 Parameter Offset: 56 Parameter Displacement: 0 Data Count: 0 Data Offset: 64 Data Displacement: 0 Setup Count: 0 Reserved: 00 Byte Count (BCC): 9 Padding: 00 SMB Pipe Protocol Microsoft Windows Lanman Remote API Protocol Function Code: NetServerEnum2 (104) Status: Unknown (8) Convert: 0 Entry Count: 0 Available Entries: 0
* r18009: Fixes bug 4026.Derrell Lipman2007-10-101-16/+28
| | | | | | | | | | | | | | | | | | | | | This completes the work Jeremy began last week, disambiguating the meaning of c_time. (In POSIX terminology, c_time means "status Change time", not "create time".) All uses of c_time, a_time and m_time have now been replaced with change_time, access_time, and write_time, and when creation time is intended, create_time is used. Additionally, the capability of setting and retrieving the create time have been added to the smbc_setxattr() and smbc_getxattr() functions. An example of setting all four times can be seen with the program examples/libsmbclient/testacl with the following command line similar to: testacl -f -S "system.*:CREATE_TIME:1000000000,ACCESS_TIME:1000000060,WRITE_TIME:1000000120,CHANGE_TIME:1000000180" 'smb://server/share/testfile.txt' The -f option turns on the new mode which uses full time names in the attribute specification (e.g. ACCESS_TIME vs A_TIME).
* r17800: Start using struct timespec internally for file timesJeremy Allison2007-10-101-7/+7
| | | | | | | | | on the wire. This allows us to go to nsec resolution for systems that support it. It should also now be easy to add a correct "create time" (birth time) for systems that support it (*BSD). I'll be watching the build farm closely after this one for breakage :-). Jeremy.
* r17761: Handle times consistently across all client utils.Jeremy Allison2007-10-101-23/+24
| | | | | Fixes bugs reported in libsmbclient. Jeremy.
* r17333: Some C++ warningsVolker Lendecke2007-10-101-1/+1
|
* r16582: Fix Klocwork #1997 and all generic class of problemsJeremy Allison2007-10-101-0/+6
| | | | | where we don't correctly check the return from memdup. Jeremy.
* r13216: r12422@cabra: derrell | 2006-01-28 23:57:35 -0500Derrell Lipman2007-10-101-17/+17
| | | | | | | Fix cli_setpathinfo() to actually do what it's supposed to. Also, get rid of some apparently drug-induced code to deal with create time which isn't being manipulated anyway.
* r12466: r12028@cabra: derrell | 2005-12-24 20:25:38 -0500Derrell Lipman2007-10-101-5/+5
| | | | parse dates correctly. w_time and m_time were reversed.
* r11511: A classic "friday night check-in" :-). This moves muchJeremy Allison2007-10-101-12/+12
| | | | | | | | | | | | | | | | of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy.
* r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4Jeremy Allison2007-10-101-3/+3
| | | | | x86_64 box. Jeremy.
* r8572: Remove crufty #define NO_SYSLOG as it's not used at all anymore.Tim Potter2007-10-101-2/+0
|
* r7172: This is the proper fix for setting file times from libsmbclient. We nowDerrell Lipman2007-10-101-0/+95
| | | | | try setpathinfo, and if that doesn't work (e.g. on win98), revert to the previous slower method.
* r6125: smbc_stat() returned incorrect timestamps IFF it used cli_qpathinfo2() toDerrell Lipman2007-10-101-4/+4
| | | | | | retrieve the timestamps (Win2k) and not if it used cli-getatr() to retrieve the timestamps (Win98). Timestamps are supposed to be in GMT, and should not have serverzone deducted from them in cli_qpathinfo2().
* r5968: derrell's large file fix for libsmbclient (BUG 2505)Gerald Carter2007-10-101-15/+15
|
* r5542: fix a few more msdfs bugs in smbclient against both smbd and 2k dfs rootGerald Carter2007-10-101-1/+16
| | | | shares.
* r5518: Add initial msdfs support to smbclient. Currently I can onlyGerald Carter2007-10-101-1/+58
| | | | | | | | | | | | cd up and down the tree and get directory listings. Still have to figure out how to get a directory listing on a 2k dfs root. Also have to work out some issues with relative paths that cross dfs mount points. We're protected from the new code paths when connecting to a non-dfs root share ( the flag from the tcon&X is stored in the struct cli_state* )
* r588: Some fixes from coolo ...Richard Sharpe2007-10-101-1/+14
| | | | I think that the ECONNREFUSED should probably be ENOENT.
* That const was one too manyVolker Lendecke2004-02-261-3/+2
|
* Apply some constVolker Lendecke2004-02-261-2/+3
| | | | Volker
* Janitor for tpot...bugzilla #1098, msleep already exists on aixJim McDonough2004-02-231-2/+2
|
* Make SMB_FILE_ACCESS_INFORMATION call work correctly.Jeremy Allison2004-02-201-1/+1
| | | | Jeremy.
* Make us bug-for-bug compatible with W2K3 - to get delete on close semanticsJeremy Allison2004-02-201-3/+8
| | | | | | on an initial open the desired_access field *must* contain DELETE_ACCESS, simply having it map from a GENERIC_ALL won't do. Fixes delete on close test. Jeremy.
* This adds client-side support for the unicode/SAMR password change scheme.Andrew Bartlett2004-01-261-5/+7
| | | | | | | | | | As well as avoiding DOS charset issues, this scheme returns useful error codes, that we can map back via the pam interface. This patch also cleans up the interfaces used for password buffers, to avoid duplication of code. Andrew Bartlett
* get rid of some sompiler warnings on IRIXHerb Lewis2003-08-151-5/+5
|
* Removed strupper/strlower macros that automatically map to ↵Jeremy Allison2003-07-031-2/+2
| | | | | | | strupper_m/strlower_m. I really want people to think about when they're using multibyte strings. Jeremy.
* Fix list of servers in 'smbclient -L' (debian bug #194553, patch by Heine ↵Jelmer Vernooij2003-05-261-1/+1
| | | | Larsen)
* More merges from HEAD:Jelmer Vernooij2003-04-161-1/+1
| | | | | | - Stephan Kulow's changes (fixing warnings in libsmbclient) - VFS modules - Seperating libs
* pstrcpy_base merges for client-side smbpasswd.Andrew Bartlett2003-03-171-9/+9
| | | | Andrew Bartlett