Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jun 2016 08:18:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-doc@FreeBSD.org
Subject:   [Bug 210652] Fix path for per-user nsmb.conf file in nsmb.conf(5)
Message-ID:  <bug-210652-9@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D210652

            Bug ID: 210652
           Summary: Fix path for per-user nsmb.conf file in nsmb.conf(5)
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Documentation
          Assignee: freebsd-doc@FreeBSD.org
          Reporter: ganael.laplanche@corp.ovh.com

Created attachment 171903
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D171903&action=
=3Dedit
Patch for nsmb.conf(5)

Hi,

r214387 introduced a wrong path for per-user nsmb.conf file. See
contrib/smbfs/lib/smb/subr.c :

164-    home =3D getenv("HOME");
165-    if (home) {
166-            fn =3D malloc(strlen(home) + 20);
167:            sprintf(fn, "%s/.nsmbrc", home);
168-            error =3D rc_open(fn, "r", &smb_rc);
169-            free(fn);
170-    }
171-    error =3D rc_merge(SMB_CFG_FILE, &smb_rc);

The file read is in fact ~/.nsmbrc, as also specified in mount_smbfs(8) :

91-FILES
92:     ~/.nsmbrc       Keeps static parameters for connections and other
information.

and /etc/nsmb.conf :

3-# smbfs lookups configuration files in next order:
4:#     1. ~/.nsmbrc
5-#     2. /etc/nsmb.conf - if this file found it will
6-#        override values with same keys from user files.

Find attached a patch that fixes the path to that file in nsmb.conf(5).

Best regards,
Ganael.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-210652-9>