[PATCH v3 4/6 incubator] Fall back to unprivileged maptime_map

Damien Zammit <[email protected]>
Newsgroups gmane.os.hurd.bugs
Message-ID <[email protected]>
This allows non-root user to use smbfs
---
 smbnetfs.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/smbnetfs.c b/smbnetfs.c
index 950d1560b..13c941323 100644
--- a/smbnetfs.c
+++ b/smbnetfs.c
@@ -1036,10 +1036,11 @@ smbfs_init ()
 {
   int err;
   err = maptime_map (0, 0, &maptime);
+  if (err)
+    err = maptime_map (1, 0, &maptime);
+  if (err)
+    error(EXIT_FAILURE, errno, "Cannot maptime_map()");
 
-  if(err)
-    return;  
-   
   pthread_mutex_init (&smb_mutex, NULL);
 
   create_root_node ();
-- 
2.51.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.