Skip to content
Snippets Groups Projects
Commit 21b39552 authored by micah's avatar micah :speech_balloon:
Browse files

r214@um: micah | 2005-12-27 09:35:03 -0500

 Added vserver functionality to the user authentication method
parent f4664660
No related branches found
No related tags found
No related merge requests found
...@@ -52,8 +52,25 @@ if [ "$user" == "" ]; then ...@@ -52,8 +52,25 @@ if [ "$user" == "" ]; then
user=root; user=root;
else else
userset=true; userset=true;
userhome=`getent passwd "$user" | awk -F: '{print $6}'` if [ $usevserver ]
[ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf" then
userhome=`$VSERVER $vsname exec getent passwd "$user" | awk -F: '{print $6}'`
if [ $? -eq 2 ]
then
fatal "User $user not found in /etc/passwd"
fi
userhome="$VROOTDIR/$vsname$userhome"
info "User home set to: $userhome"
[ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf"
else
userhome=`getent passwd "$user" | awk -F: '{print $6}'`
if [ $? -eq 2 ]
then
fatal "User $user not found in /etc/passwd"
fi
info "User home set to: $userhome"
[ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf"
fi
fi fi
## Prepare ignore part of the command ## Prepare ignore part of the command
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment