[ofa-general] Re: [PATCH v2] saquery: --smkey command line option

Hal Rosenstock hrosenstock at xsigo.com
Mon Jun 2 11:44:37 PDT 2008


On Mon, 2008-06-02 at 21:11 +0300, Sasha Khapyorsky wrote:
> On 07:01 Mon 02 Jun     , Hal Rosenstock wrote:
> > On Sat, 2008-05-31 at 20:28 +0300, Sasha Khapyorsky wrote: 
> > > This adds possibility to specify SM_Key value with saquery. It should
> > > work with queries where OSM_DEFAULT_SM_KEY was used.
> > > 
> > > If non-numeric string (like 'x') is provided with --smkey option then
> > > saquery will prompt to get SM_Key value.
> > > 
> > > Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
> > > ---
> > > 
> > > SM_key value prompting was added as addition to v1 of the patch.
> > > 
> > >  infiniband-diags/src/saquery.c |   20 +++++++++++++++++---
> > 
> > man page change is needed for this too.
> 
> Sure.
> 
> > > @@ -1512,6 +1518,14 @@ main(int argc, char **argv)
> > >  		case 3:
> > >  			node_name_map_file = strdup(optarg);
> > >  			break;
> > > +		case 4:
> > > +			if (!isxdigit(*optarg) &&
> > > +			    !(optarg = getpass("SM_Key: "))) {
> > 
> > Man page for getpass indicates:
> > "This function is obsolete. Do not use it."
> 
> Right, but glibc info page doesn't indicate this.

I looked at the man pages on both RHEL4 and RHEL5 machines.

-- Hal

>  Also I did some
> googling and looked at glibc code itself - found nothing suspicious yet.
> Finally it is how password handled in 'su'.
> 
> Sasha




More information about the general mailing list