[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC 1/4] osstest: add routine to execute ssh with password



Roger Pau Monne writes ("[PATCH RFC 1/4] osstest: add routine to execute ssh 
with password"):
> This is needed when bootstrapping FreeBSD, since the installer has ssh
> enabled with the root password set to 'root' by default.

> +    open(my $temp_fh, '>', "tmp/t.ssh-password-helper.$flight.$job")
> +      or die "Cannot open tmp/t.ssh-password-helper.$flight.$job: $!";

Put this pathname in a variable so that you don't have to write it
three times.

> +    print $temp_fh "#!/bin/sh\n\necho \"$password\"\n";

or die $!;

> +    chmod 0755, $temp_fh;

You should probably chmod the path, not the fh.  That's more usual,
although all of our hosts do in fact have fchmod(2).

> +    close $temp_fh;

or die $!;


Otherwise, this is fine.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.