svn commit: r356317 - head/contrib/smbfs/lib/smb
Gleb Popov
arrowd at FreeBSD.org
Fri Jan 3 12:54:15 UTC 2020
Author: arrowd (ports committer)
Date: Fri Jan 3 12:54:14 2020
New Revision: 356317
URL: https://svnweb.freebsd.org/changeset/base/356317
Log:
mount_smbfs: Issue a warning when .nsmbrc section name contains lowercase characters.
PR: 231656
Approved by: bapt
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D22289
Modified:
head/contrib/smbfs/lib/smb/rcfile.c
Modified: head/contrib/smbfs/lib/smb/rcfile.c
==============================================================================
--- head/contrib/smbfs/lib/smb/rcfile.c Fri Jan 3 10:03:36 2020 (r356316)
+++ head/contrib/smbfs/lib/smb/rcfile.c Fri Jan 3 12:54:14 2020 (r356317)
@@ -156,11 +156,19 @@ static struct rcsection *
rc_addsect(struct rcfile *rcp, const char *sectname)
{
struct rcsection *p;
+ const char* sectletter = sectname;
p = rc_findsect(rcp, sectname);
if (p) return p;
p = malloc(sizeof(*p));
if (!p) return NULL;
+ for(sectletter = sectname; *sectletter; sectletter++) {
+ if (islower(*sectletter)) {
+ if (strcmp(sectname, "default"))
+ dprintf(STDERR_FILENO, "warning: section name [%s] contains lower-case letters\n", sectname);
+ break;
+ }
+ }
p->rs_name = strdup(sectname);
SLIST_INIT(&p->rs_keys);
SLIST_INSERT_HEAD(&rcp->rf_sect, p, rs_next);
More information about the svn-src-all
mailing list