Re: gCvs not logging on to pserver - fixed! (maybe)
Guy Rouillier <[email protected]> Sun, 1 Aug 2004 00:47:32 -0400
| Newsgroups | gmane.comp.version-control.cvs.gui.devel |
|---|---|
| Message-ID | <20040801004732.65db316e@emach> |
I've been able to get this to work with a change to cvsnt. Because I'm
very new to all this, I'd like the more experienced people here to take
a look before I submit it to the cvsnt people.
In cvsnt module src/login.c is the following logic in function "int
login (argc, argv)":
if (current_parsed_root->password)
typed_password = current_parsed_root->password;
else
{
typed_password = GETPASS ("CVS password: ");
}
GETPASS is defined at the top of login.c to either getpassphrase or
getpass, apparently standard Unix functions that are simple command-line
prompts.
If I substitute the following:
typed_password = cvsguiglue_getpass("CVS password: ");
this seems to work for both cvsnnt command-line invocations as well as
CvsGui invocations, since the cvsguiglue_getpass function in cvsgui.c
has a passthrough to getpass if it detects that it is not running in a
CvsGui environment. With this change, I'm now getting the password
popup in gCvs, and am able to fill it in and login successfully.
Is this the appropriate fix? If so, how do I convey it the the cvsnt
folks?
On Fri, 30 Jul 2004 00:32:17 -0400
Guy Rouillier <[email protected]> wrote:
> On Thu, 29 Jul 2004 14:16:57 +0200
> Jens Miltner <[email protected]> wrote:
>
> > > (1) Is there a callback mechanism such that if cvsnt needs a
> > > password, it can ask CvsGui for it over the open pipes? Then
> > > CvsGui would pop up a dialog, get the password from the user and
> > > return the answer to the waiting cvsnt.
> >
> > I think there is some code that attempts to catch password queries
> > in AppGlue.cpp, Line 342 ff.
> > I'm not sure whether this code is really used during cvs execution,
> > since it relies on some environment variable to be queried.
> > cvsnt should route the getenv queries through the cvsgui wire
> > protocol, so _if_ it queries that env variable, it'll end up
> > there...
>
> Jens, thanks for the reply. Here is my progress so far. I put some
> cvs_log statements in AppGlue.cpp, function glue_getenv, here is what
> happens when I try to login:
>
> cvs -z3 -d :pserver:[email protected]:/data/cvs/cvsroot
> login
>
> AppGlue::glue_getenv TMPDIR
> AppGlue::glue_getenv CVSEDITOR
> AppGlue::glue_getenv VISUAL
> AppGlue::glue_getenv EDITOR
> AppGlue::glue_getenv CVSROOT
> AppGlue::glue_getenv CVSREAD
> AppGlue::glue_getenv CVSUMASK
> Logging in to
> :pserver:[email protected]:2401:/data/cvs/cvsroot
>
> It gets called a bunch of times, but not for CVS_GETPASS
> unfortunately. When I run inside anjuta so that i get a console, the
> prompt I get is"CVS password: ". This is not coming from gCvs, but
> from cvsnt, file src/login.c.
>
> I'll continue with this on the weekend. The good news is that if I
> can figure out how to get the env variable triggered, I see in
> GetPassword.cpp function CompatGetPassword that the password dialog is
> created to prompt the user for the password.
>
> I see a lot of code in CompatGetPassword for the Mac. Do you know if
> you get prompted for a password for pservers in MacCvs?
>
> --
> Guy Rouillier
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> Yahoo! Domains - Claim yours for only $14.70
> http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/NhFolB/TM
> --------------------------------------------------------------------~
> ->
>
>
> Yahoo! Groups Links
>
>
>
>
>
--
Guy Rouillier
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/NhFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/cvsgui-dev/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/