GNOME Bugzilla – Bug 168203
[PATCH] Add support for the FreeBSD SSH
Last modified: 2006-07-14 11:09:55 UTC
Please describe the problem: Attached are patches that fix three problems in gnome-vfs. The first checks to see that the lagacy EAI_ADDRFAMILY and EAI_NODATA macros are defined before using them. They have been obsoleted in FreeBSD 5.X and later. The second adds support for the FreeBSD SSH "password:" and "Password:" (note the lack of a trailing space) prompts. The third fixes a build issue with GCC 2.95.x by removing a redundant semi-colon. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 37803 [details] [review] Fix some FreeBSD build and functional issues
Thanks for your efforts. We heavily appreciate your patch.
*** Bug 168861 has been marked as a duplicate of this bug. ***
Maybe you could update your patch to apply cleanly against HEAD? The combined "if defined" statement against libgnomevfs/gnome-vfs-resolve.c was bogus, since each of them should be compiled in independently if the other one isn't defined. Because HEAD already has the EAI_ADDRFAMILY bits, you'd simply have to add another "if defined" statement :).
Created attachment 46375 [details] [review] New patch that applies to gnome-vfs HEAD
If we are already using g_str_has_prefix (buffer, "prefix") and don't see any reasion why whe should not *only* check for the diffrent passwords prompts without the trailing space. I mean "Password: blalba" has "Password: " and "Password:" as prefix right? The EAI_NODATA part looks good for me though!
I agree that g_str_has_prefix() would be a better choice, and would preclude the need for my additional patches.
Maybe some ssh servers have prompts like "Please enter your password" ? (just wildly trying to guess why there are both g_str_has_suffix and g_str_has_prefix)
Created attachment 51023 [details] [review] gnome-vfs-2.10.1-fbsd.patch The EAI_NODATA part of the original patch assume that EAI_ADDRFAMILY is defined only if EAI_NODATA is defined. This one (over 2.10.1) allows EAI_ADDRFAMILY to be defined without EAI_NODATA. Hope to see this fixed soon as Gentoo/FreeBSD needs it, too.
Diego, I resubmitted the patch a few months ago against HEAD at the time to fix this problem. Now, gnome-vfs does check for EAI_ADDRFAMILY, but not for EAI_NODATA.
I seen that but not having an HEAD checkout handy (and needing anyway the full patch against 2.10) I just re-did that. Anyway attachment #46375 [details] make EAI_ADDRFAMILY fallback to "case EAI_SYSTEM: return gnome_vfs_result_from_errno ();" if it's defined but EAI_NODATA is not. I can't tell if there's a case where EAI_ADDRFAMILY is defined but EAI_NODATA no, but better safe than sorry, it avoids adding a possible fallback error doing the checks for both before adding the code. Without checking for EAI_NODATA it still breaks so the check is needed for a clean build. The patch (at least in theory) should apply with an ignored chunk (modifies already contained in original file)... if it's a problem I can get an HEAD checkout and do the same. Sorry if I've misunderstood something.
Created attachment 51350 [details] [review] gnome-vfs-2.11.92-fbsd.patch Equivalent of attachment 51023 [details] [review] patch but over 2.11.92 .. Hunk #1 of attachment 46375 [details] [review] breaks when EAI_NODATA is not defined but EAI_EADDRFAMILY is. This makes sure that if either one of the two is present it gets the right handling.
Created attachment 51354 [details] [review] gnome-vfs-2.11.92-fbsd.patch Actually this patch is better, as it *really* fix the build of gnome-vfs 2.11.92 ... we have chances to get this fixed before 2.12 release?
Sorry dudes I must have totally overlooked that bug here. I committed the EAI_NODATA part to cvs HEAD. I am going to rename the bug for the renaming part.adds support for the FreeBSD SSH
Hi, it seems the "password: " / "Password:" issue is still around as of 2.12.2, I looked at the CVS HEAD and couldn't see a fix for it. Has it been decided not to fix this? I am only commenting on this because I ran into the issue of not being able to contact FreeBSD OpenSSH servers on Gentoo using gnome-vfs-2.12.2. It seems Gentoo used to have a patch for the "password: " / "Password:" issue but removed it, presumably because they thought it was fixed upstream, which as far as I can see wasn't (but I could be wrong). I also left a comment in their bugzilla at http://bugs.gentoo.org/show_bug.cgi?id=103130 . I'm sorry for barging in here without a patch, I did try to come up with something but I have never written more than a handful lines of C code and would probably do more harm than good ;)
Hans: The Password issue was filed as bug 322390 and fixed in GnomeVFS 2.14.
Setting status of attachment 46376 [details] to obsolete because its bit are included in other (committed) patches. Attachment 51354 [details] seems to be marked as committed although the include addition (<sys/params.h>) isn't committed to modules/file-method.c. No complaints, and the issue is not mentioned by any reporter, so I'm assuming that it the modification wasn't neccessary. Feel free to reopen this bug report or file a new one if you still have build issues.