Tim,
Tim Bunce writes:
> On Wed, Aug 27, 2003 at 07:22:17PM +0300, jani@xxxxxxxxx wrote:
> >
> > ChangeSet
> > 1.1535 03/08/27 19:22:14 jani@xxxxxxxxxxxxxxxxxxxxxxxxx +5 -0
> > Added a warning to my_print_defaults if --verbose is given
> > and --defaults-file is a non-existing or non-regular file.
> > Bug#755
>
> Why restrict all non-regular file types?
>
> Bug#755 doesn't mention "non-regular file" and some non-regular
> file types, like pipes, are specifically supported elsewhere.
>
> For example, creating a pipe and starting a mysql client with
> "--defaults-extra-file=/dev/fd/$fh"
> and writing "[client]\npassword=$passwd\n" into the pipe is the
> only fully secure way to pass the password to the subprocess.
>
>
> > +/*
> > + Return values: 0 Success
> > + 1 Fatal error, abort
> > + 2 File not found, continue
> > + 3 File is not a regular file, continue
> > +*/
> > +static int search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
> > + const char *dir, const char *config_file,
> > + const char *ext, TYPELIB *group)
> > {
> > @@ -247,7 +254,7 @@
> > /*
> > Ignore world-writable regular files.
> > This is mainly done to protect us to not read a file created by
> > @@ -260,6 +267,8 @@
> > name);
> > return 0;
> > }
> > + else if ((stat_info.st_mode & S_IFMT) != S_IFREG)
> > + return 3;
>
> Tim.
You are right. I have now removed this restriction.
Regards,
- Jani
For technical support contracts, visit https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Jani Tolonen <jani@xxxxxxxxx>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
<___/ www.mysql.com
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:
http://lists.mysql.com/internals?unsub=gcdmd-internals@xxxxxxxxxxx
|