~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to client/get_password.cc

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
      return make_pair("password", PASSWORD_SENTINEL);
160
160
    }
161
161
  }
162
 
 
 
162
  
 
163
  else if (s.find("-P") == 0)
 
164
  {
 
165
    if (s == "-P")
 
166
    {
 
167
      tty_password= true;
 
168
      //check if no argument is passed.
 
169
      return make_pair("password", PASSWORD_SENTINEL);
 
170
    } 
 
171
    
 
172
    if (s.substr(2,2) == "\"\"" || s.substr(2,2) == "''")
 
173
    {
 
174
      // Check if -P"" or -P''
 
175
      return make_pair("password", PASSWORD_SENTINEL);
 
176
    }  
 
177
  }
163
178
  return make_pair(string(""), string(""));
164
179
}
165
180