From: Matthias A. <mat...@gm...> - 2009-04-03 00:58:20
|
Am 09.02.2009, 12:58 Uhr, schrieb Prasad J Pandit <pj....@ya...>: > Hello folks, > > I was using fetchmail-6.3.9 as > > $ fetchmail -cu <name> -D na...@my... --ssl mail-server 2> /dev/null > > and noticed that the prompt which says: "Enter password for %s@%s" is > displayed on stderr instead of steout. Hi Prasad, thanks for your effort to contribute. While undocumented, chances are that this was intentional for some reason. I've checked the relevant code, and fetchmail opens /dev/tty from file descriptor #2 with fdopen(), which is also stderr, to save/change/restore settings such as not echoing the password back to the user. I wonder if it's more common that people discard stdout (progress) instead of stderr (problems) - and I suspect that was the reason to use stderr... At least, if we go this way, we need to fix the fdopen as well to use stdout. I wonder if "-s" (--silent) is an option that works for you if you want less output, rather than discarding 2>/dev/null - it is currently unclear to me which ACTUAL problem you try to solve by redirecting stderr to the bit bucket. Would you care to enlighten me a bit? > The attached patch fixes this bug and a warning message encountered > while compiling the source. > > > The other warning messages were: > > smbutil.c:207: warning: the address of ‘lmRespData’ will always evaluate > as ‘true’ > smbutil.c:208: warning: the address of ‘ntRespData’ will always evaluate > as ‘true’ > > that's because both are statically allocated array variables. Yes. :-( I currently understand too little of NTLM authentication to actually touch this code myself. I'd be more comfortable with using an external NTLM library. I still need to look at the GSoC 2008 patches to add OpenChange support (my fault - haven't had the time, and I feel sorry for not yet merging Yangyan's code) - perhaps this is a way to do away with our old NTLM code. -- Matthias Andree |