mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-01-08 15:44:11 +00:00
Added check for left square bracket character at the
beginning of the line in the password file. Resolves issue #126 git-svn-id: http://s3fs.googlecode.com/svn/trunk@263 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
parent
b7fc931962
commit
ded2dd527d
@ -1,7 +1,7 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(s3fs, 1.16)
|
||||
AC_INIT(s3fs, 1.17)
|
||||
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
@ -1890,6 +1890,13 @@ static void read_passwd_file (void) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
first_pos = line.find_first_of("[");
|
||||
if (first_pos != string::npos && first_pos == 0) {
|
||||
printf ("%s: invalid line in passwd file, found a bracket \"[\" character\n",
|
||||
program_name.c_str());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
first_pos = line.find_first_of(":");
|
||||
if (first_pos == string::npos) {
|
||||
printf ("%s: invalid line in passwd file, no \":\" separator found\n",
|
||||
|
Loading…
Reference in New Issue
Block a user