~xnox/ubuntu/quantal/shadow/clear-locks

« back to all changes in this revision

Viewing changes to lib/fputsx.c

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Valcárcel Scerpella (Canonical)
  • Date: 2009-11-07 04:55:18 UTC
  • mfrom: (1.1.8 upstream) (18.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091107045518-qqclg1lhinz6zv1i
Tags: 1:4.1.4.2-1ubuntu1
* Merged with debian unstable. Remaning changes (LP: #477299):
  - Ubuntu specific:
    + debian/login.defs: use SHA512 by default for password crypt routine.
  - debian/patches/495_stdout-encrypted-password: chpasswd can report
    password hashes on stdout (Debian bug 505640).
  - Rework 495_stdout-encrypted-password to cope with chpasswd using PAM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#include "defines.h"
37
37
#include "prototypes.h"
38
38
 
39
 
#ident "$Id: fputsx.c 2774 2009-04-23 11:54:30Z nekral-guest $"
 
39
#ident "$Id: fputsx.c 3021 2009-06-12 20:20:45Z nekral-guest $"
40
40
 
41
41
 
42
42
/*@null@*/char *fgetsx (/*@returned@*/ /*@out@*/char *buf, int cnt, FILE * f)
45
45
        char *ep;
46
46
 
47
47
        while (cnt > 0) {
48
 
                if (fgets (cp, cnt, f) == 0) {
 
48
                if (fgets (cp, cnt, f) != cp) {
49
49
                        if (cp == buf) {
50
50
                                return 0;
51
51
                        } else {