File: 008-disallow-luserconf-path

package info (click to toggle)
libpam-mount 2.22-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,312 kB
  • sloc: ansic: 6,266; sh: 5,298; makefile: 119; xml: 9
file content (14 lines) | stat: -rw-r--r-- 580 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Index: libpam-mount-2.14/src/rdconf1.c
===================================================================
--- a/src/rdconf1.c
+++ b/src/rdconf1.c
@@ -853,6 +853,9 @@ static const char *rc_string(xmlNode *node, struct config *config,
 				config->msg_sessionpw = xstrdup(signed_cast(const char *, node->content));
 				break;
 			case CMDA_PATH:
+				if (config->level != CONTEXT_GLOBAL)
+					return "Tried to set path from user config: "
+					       "not permitted\n";
 				free(config->path);
 				config->path = xstrdup(signed_cast(const char *, node->content));
 				break;