>Description:
        getpwent on FreeBSD requires the file /etc/spwd.db to exist in
        order for it to be successful. In a chroot'd environment, this
        file disappears, and mysqld errors out with a "Can't find user"
        error message, even though the user exists on the system.
>How-To-Repeat:
        Attempt to use the --chroot=/usr/local/mysql option on FreeBSD.
>Fix:
        The workaround is to copy /etc/spwd.db to /usr/local/mysql/etc.
        A fix is to use the function getpwent to get the UID before 
        chroot(), and pass the UID instead of the name to the set_user 
        function in the file sql/mysqld.cc.

>Submitter-Id:  <submitter ID>
>Originator:    Kelvin Wood
>Organization:
 none
>MySQL support: none
>Synopsis:      getpwent for --user fails after chroot()
>Severity:      non-critical
>Priority:      low
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-3.23.43 (Source distribution)

>Environment:
        
System: FreeBSD pii350.localdomain 4.4-RELEASE FreeBSD 4.4-RELEASE #4: Wed Oct 17 
20:04:15 GMT 2001     [EMAIL PROTECTED]:/usr/src/sys/compile/JAZZ  i386


Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Using builtin specs.
gcc version 2.95.3 20010315 (release) [FreeBSD]
Compilation info: CC='gcc'  CFLAGS='-O3 -mpentiumpro'  CXX='c++'  CXXFLAGS='-O3 
-mpentiumpro -felide-constructors -fno-exceptions -fno-rtti'  LDFLAGS=''
LIBC: 
-r--r--r--  1 root  wheel  1205382 Sep 18 17:24 /usr/lib/libc.a
lrwxrwxrwx  1 root  wheel  9 Sep 30 15:20 /usr/lib/libc.so -> libc.so.4
-r--r--r--  1 root  wheel  572876 Sep 18 17:24 /usr/lib/libc.so.4
Configure command: ./configure  --enable-assembler 
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock --prefix=/usr/local/mysql
Perl: This is perl, version 5.005_03 built for i386-freebsd

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to