Displaying 1 result from an estimated 1 matches for "restrictdirectory".
2007 Nov 11
1
ftp-server patch - restrict user to directory
...ot;pathnames.h"
/* helper */
#define get_int64() buffer_get_int64(&iqueue);
@@ -74,6 +74,141 @@
Attrib attrib;
};
+/* Name of the server configuration file. */
+char *config_file_name = _PATH_SFTP_CONFIG_FILE;
+
+/* If not NULL restrict the user to under this directory */
+char* RestrictDirectory;
+
+/* **** Start parsing config file code **** */
+
+/* Read the optional config file. If mandatory the file must exist.
+ * Exit on error.
+ */
+static void
+load_sftp_config(char* file_name, int mandatory)
+{
+ char line[1024], *cp, *arg, *opt;
+ FILE *f;
+ int lineno = 0;
+
+ debug2("%s: f...