maindavfs2 - Support: sr #108583, Status of support for Sharepoint /...

 
 

sr #108583: Status of support for Sharepoint / Office 365 variety of OneDrive / SkyDrive

Submitter:  None
Submitted:  Tue 27 May 2014 10:05:16 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  In Progress
Privacy:  Public Assigned to:  _71007
Originator Email:  -email is unavailable- Open/Closed:  Closed
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 19 Jun 2014 09:24:04 AM UTC, comment #6: 


> It will contain either option -lneon or -lneon-gnutls

Yeah I saved a copy of the output of 'make' and I can confirm it did say '-lneon' so it has been compiled OK.

> I'm not interested in digging into some Microsoft cloud service

I don't blame you, it stinks.

Steven

Anonymous
Tue 17 Jun 2014 07:10:18 PM UTC, comment #5: 

You need exactly one libneonXXXXX-devel package installed. It contains all the necessary information. The configure script of davfs2 will check this information and know which neon library to link against. Your package management system will not allow you to install two different -devel packages for neon. There is no need for any option.

Only if you have additionally a neon package (including the header files and neon-config) installed under /usr/local you can decide whether to use neon from the /usr/local tree or the one from your distribution in the /usr tree.

Pleas look at the output of make and search for the run of the linker. It will contain either option -lneon or -lneon-gnutls. But it is not necessary. The correct -devel package is the important point.

If you want to know how the configure script works, you will have to look at the configure.ac file, config/davfs2.m4 file and config/neon.m4 file.

I'm not interested in digging into some Microsoft cloud service. I have a lot of tasks higher up on my priority list and not time enough to care for these. If someone knows what davfs2 has to do to work with OneDrive, I'm willing to include the necessary code (if possible). But nothing more.

Cheers
Werner

- <_71007>
Tue 17 Jun 2014 07:26:39 AM UTC, comment #4: 

Hey!

> davfs2 does not compile against any SSL-library


I know but you did say it compiles against libneon27 (OpenSSL based) or libneon27-gnutls (GnuTLS based) - so is there anyway to tell it which libneon to use at compile time... or perhaps tell it to pass arguments to neon-config?  I'm not sure what to do with neon-config, there doesn't seem to be an option for specifying anything, just looking up information.

> look at the server logs why it resets the connection


When you say the server logs I'm guessing you mean the server running the Office 365 Sharepoint / OneDrive service?  So not an option really :)

> use 'openssl s_client'


I tried this command and got this result... but I think I'm just getting this result because obviously its just a test and I'm not actually saying anything on that connection....

$ openssl s_client -connect companyname-my.sharepoint.com:443 -servername companyname-my.sharepoint.com

CONNECTED(00000003)
write:errno=104
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 267 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---

> use a networksniffer and analyzer like Wireshark


Sure I've used this before, not sure if I'll understand the results mind you.

---

If this little endeavor has peaked your interest even slightly then perhaps you'd like to meet up on IRC some time and do some tests together?  I can share pcap traces, give you access to an Office 365 account (no need to accept MS terms & conditions!)... generally just work through it?  davfs2 would be the first method ever of using SkyDrive/OneDrive for Business on Linux (not that there aren't much better alternatives out there but hey).

Thanks

Steven

Anonymous
Mon 16 Jun 2014 06:22:46 PM UTC, comment #3: 

"Request ends, status 0 class 0xx, error line:#012SSL handshake failed: Connection reset by peer "

It is the server that stops the TLS-handshake. To go on you must find out why.
I am sure that both versions of Neon are able to negotiate a TSL-connection. To find out why the server stops the handshake you can

  • use a networksniffer and analyzer like Wireshark to fetch the network traffic and analyze the handshake.


  • look at the server logs why it resets the connection.


  • use 'openssl s_client', 'gnutls-cli' or 'gnutls-cli-debug' to manually create an TLS-connection and to see what's the problem.


Some hints:

  • davfs2 does not compile against any SSL-library. It just needs the Neon library. TLS is handled by Neon and not by any davfs2-code. Which Neon library is used is defined by neon-config which is part of the devel package and which is used by the configure script of davfs2.


  • there is no need to copy any files manually. All files are copied by 'make install' to their correct places (the user config file in ~/.davfs2 is created by davfs2 when the user mounts for the first time).


  • your system's davfs2.conf file may belong into /etc or /usr/local/etc depending on what prefix you set when you run ./configure. It is recommended to not set any prefix. Then configure will use prifix /usr/local by default to not interfere with packages from your distribution. The system's config file will then be in /usr/local/etc/.


  • 'make install' will also install the manpages 'mount.davfs' and 'davfs2.conf'. These man pages will show the correct names (including the path) of all files.


  • if you use the standard config files there is no need for option "conf=  ".


  • what URL to use, whether you are allowed to connect to this server, what kind of credentials you need, all this is defined by the operator of the server.


Werner

- <_71007>
Mon 16 Jun 2014 12:17:12 PM UTC, comment #2: 

Hi,

So I did a you asked... downloaded http://download.savannah.gnu.org/releases/davfs2/davfs2-1.5.0.tar.gz and compiled it with ./configure, make and make install on my Ubuntu 12.04 system.  I first uninstalled any davfs2 I already had and made sure I had libneon27-dev and libneon27 installed (libneon27-gnutls left installed for other things that depend on it).  I couldn't find any instructions on how to make it compile against OpenSSL rather than GnuTLS - so I assume it must prefer one over the other?

I copied the davfs2.conf file that was in the etc directory of the tar.gz sources to my /etc/davfs2/ and turned on all the debug modes.

I tried to mount my share like this...

sudo mount -t davfs -o conf=/etc/davfs2/davfs2.conf https://companyname-my.sharepoint.com/personal/username_companyname_com/Documents /home/username/OneDrive

I beleive this URL is correct as it resembles the kind of connection URLs seen in this guide... https://faq.oit.gatech.edu/content/how-do-i-sync-onedrive-business-my-computer

I see this in my syslog...

It seems to get stuck where it says 'Doing SSL negotiation.'

Jun 16 13:01:14 davfs2 1.5.0
Jun 16 13:01:14 /sbin/mount.davfs https://companyname-my.sharepoint.com/personal/username_companyname_com/Documents /home/username/OneDrive -o rw,conf=/etc/davfs2/davfs2.conf
Jun 16 13:01:14 Configuration:
Jun 16 13:01:14   url: https://companyname-my.sharepoint.com/personal/username_companyname_com/Documents
Jun 16 13:01:14   mount point: /home/username/OneDrive
Jun 16 13:01:14   dav_user: davfs2
Jun 16 13:01:14   dav_group: davfs2
Jun 16 13:01:14   conf: /etc/davfs2/davfs2.conf
Jun 16 13:01:14   user: 0
Jun 16 13:01:14   netdev: 1
Jun 16 13:01:14   grpid: 0
Jun 16 13:01:14   mopts: 0xc0ed0006
Jun 16 13:01:14   kernel_fs: (null)
Jun 16 13:01:14   buf_size: 0 KiB
Jun 16 13:01:14   uid: 0
Jun 16 13:01:14   gid: 0
Jun 16 13:01:14   dir_mode: 040755
Jun 16 13:01:14   file_mode: 0100644
Jun 16 13:01:14   scheme: https
Jun 16 13:01:14   host: companyname-my.sharepoint.com
Jun 16 13:01:14   port: 443
Jun 16 13:01:14   path: /personal/username_companyname_com/Documents/
Jun 16 13:01:14   trust_ca_cert: (null)
Jun 16 13:01:14   trust_server_cert: (null)
Jun 16 13:01:14   secrets: (null)
Jun 16 13:01:14   clicert: (null)
Jun 16 13:01:14   p_host: (null)
Jun 16 13:01:14   p_port: 8080
Jun 16 13:01:14   useproxy: 0
Jun 16 13:01:14   askauth: 1
Jun 16 13:01:14   locks: 1
Jun 16 13:01:14   lock_owner: (null)
Jun 16 13:01:14   lock_timeout: 1800 s
Jun 16 13:01:14   lock_refresh: 60 s
Jun 16 13:01:14   expect100: 0
Jun 16 13:01:14   if_match_bug: 0
Jun 16 13:01:14   drop_weak_etags: 0
Jun 16 13:01:14   n_cookies: 0
Jun 16 13:01:14   precheck: 1
Jun 16 13:01:14   ignore_dav_header: 0
Jun 16 13:01:14   use_compression: 0
Jun 16 13:01:14   follow_redirect: 0
Jun 16 13:01:14   connect_timeout: 10 s
Jun 16 13:01:14   read_timeout: 30 s
Jun 16 13:01:14   retry: 30 s
Jun 16 13:01:14   max_retry: 300 s
Jun 16 13:01:14   s_charset: (null)
Jun 16 13:01:14   header: (null)
Jun 16 13:01:14   sys_cache: /var/cache/davfs2
Jun 16 13:01:14   cache_dir: /var/cache/davfs2
Jun 16 13:01:14   backup_dir: lost+found
Jun 16 13:01:14   cache_size: 50 MiB
Jun 16 13:01:14   table_size: 1024
Jun 16 13:01:14   dir_refresh: 60 s
Jun 16 13:01:14   file_refresh: 1 s
Jun 16 13:01:14   delay_upload: 10
Jun 16 13:01:14   gui_optimize: 0
Jun 16 13:01:14   minimize_mem: 0
Jun 16 13:01:14   debug: 0xf
Jun 16 13:01:14   neon_debug: 0x1bf
Jun 16 13:01:14 mounts in: /proc/mounts
Jun 16 13:01:21 Secrets:
Jun 16 13:01:21   username: -email is unavailable-
Jun 16 13:01:21   cl_username: (null)
Jun 16 13:01:21   password: mypassword
Jun 16 13:01:21   p_user: (null)
Jun 16 13:01:21   p_passwd: (null)
Jun 16 13:01:21   clicert_pw: (null)
Jun 16 13:01:21 PID file: /var/run/mount.davfs/home-username-OneDrive.pid
Jun 16 13:01:21 changing persona: euid 116, gid 128
Jun 16 13:01:21 Initializing webdav
Jun 16 13:01:21 HTTP session to https://companyname-my.sharepoint.com:443 begins.
Jun 16 13:01:21 ssl: SNI enabled by default.
Jun 16 13:01:21 Initializing cache
Jun 16 13:01:21 Alignment of dav_node: 16
Jun 16 13:01:21 Checking cache directory
Jun 16 13:01:21   /var/cache/davfs2/companyname-my.sharepoint.com-personal-username_companyname_com-Documents+home-username-OneDrive+root
Jun 16 13:01:21 new node: (nil)->0x2306b80
Jun 16 13:01:21 Reading stored cache data
Jun 16 13:01:21 new node: 0x2306b80->0x2306c20
Jun 16 13:01:21 ah_create, for WWW-Authenticate
Jun 16 13:01:21 Running pre_send hooks
Jun 16 13:01:21 Sending request headers:#012OPTIONS /personal/username_companyname_com/Documents/ HTTP/1.1#015#012User-Agent: davfs2/1.5.0 neon/0.29.6#015#012Keep-Alive: #015#012Connection: TE, Keep-Alive#015#012TE: trailers#015#012Host: companyname-my.sharepoint.com#015#012#015
Jun 16 13:01:21 Sending request-line and headers:
Jun 16 13:01:21 Doing DNS lookup on companyname-my.sharepoint.com...
Jun 16 13:01:21 req: Connecting to 157.55.229.87:443
Jun 16 13:01:21 Doing SSL negotiation.
Jun 16 13:01:51 sess: Closing connection.
Jun 16 13:01:51 sess: Connection closed.
Jun 16 13:01:51 Request ends, status 0 class 0xx, error line:#012SSL handshake failed: Connection reset by peer
Jun 16 13:01:51 Running destroy hooks.
Jun 16 13:01:51 Request ends.

Any advice you can give will be greatly appreciated, I'm sure there are many others out there battling to get OneDrive working in their offices too.

Thanks

Steven

Anonymous
Mon 09 Jun 2014 07:30:09 PM UTC, comment #1: 

NTLM authentication is only supported when your Neon library is compiled against OpenSSL. It does not work when GnuTLS is used. Debian and Debian derivatives like Ubuntu have two different Neon packages, one with OpenSSL, one with GnuTLS. davfs2 on these systems is build with the GnuTLS version.

If you use one of these operating systems and need NTLM you will have to build davfs2 with the openssl version of neon. You will need:
- the davfs2 source package from this server
- the libneon27-devel package from your distribution (and not the libneon27-gnutls-devel package)
- the libneon27 package (most probably already installed).

Pleas read the INSTALL file of the davfs2 sources for the rest.

Werner

- <_71007>
Tue 27 May 2014 10:05:16 AM UTC, original submission:  

Hey,

Unfortunately where I work, the powers that be have migrated us to Office 365.  The cloud storage product that comes with it (although it's called 'OneDrive') isn't the regular OneDrive as I think it's actually based on Sharepoint.

Anyway I've read a few people attempting to use davfs2 to connect this and most are discovering that the NTLM authentication is the problem and it won't connect.

It looks like this has come up before and someone submitted a patch to support it... http://savannah.nongnu.org/support/?107060

If it is supported, does anyone know of any options and such that should be provided extra?

Steven

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by _71007 (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-15 _71007 Open/ClosedOpen Closed
    2014-06-09 _71007 StatusNone In Progress
        Assigned toNone _71007

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code