util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: kerolasa@gmail.com
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: [pull] login-utils maintenance fixes
Date: Wed, 23 Nov 2011 17:52:59 +0100	[thread overview]
Message-ID: <20111123165259.GC3092@nb.net.home> (raw)
In-Reply-To: <CAG27Bk2uza2TVvZguXRcWbg58NJ=Fpo3608c9rRyBhynNM2h-w@mail.gmail.com>

On Sat, Nov 19, 2011 at 10:43:35PM +0100, Sami Kerola wrote:
>       chfn: use libc error printing facilities

 Please, see how the original code uses "msg" in check_gecos_string().
 I think that proper fix is:

 if (msg)
    warnx (_("%s: '%c' is not allowed"), msg, c);
 else
    warnx (_("'%c' is not allowed"), c);

 and so on...

 It also seems that check_gecos_string() in main() should be called
 with static strings, so you can remove the strcats, the strings
 (e.g. "full name") should be also translated

    status = check_gecos_string(_("full name"), optarg);

 see also ask_info() where are the strings too. It would be better to
 use the same strings :-)

>       chfn, chsh, setpwnam: use stdbool.h

 hmm... what about to use old good 'int'?

>       chfn, chsh: share require password error print definition

 The macros are horrible. Please, see is_pam_failure() and
 loginpam_err() in login.c. I think it would be better to create
 pamfail.h with inline functions / macros. 
 
 Note that we cannot share this code with login.c where is also
 necessary to call syslog() and sleep()).

>       build-sys: trust autotools setting *_SOURCES definitions

 This commit subject is odd... do you mean "fix coding style"? :-)

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

      reply	other threads:[~2011-11-23 16:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-19 21:43 [pull] login-utils maintenance fixes Sami Kerola
2011-11-23 16:52 ` Karel Zak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111123165259.GC3092@nb.net.home \
    --to=kzak@redhat.com \
    --cc=kerolasa@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).