nbpwd_mkdb

src/tools/pwd_mkdb が SEGV でこけるので調べてみたら、src/tools/compat/compat_pwd.h の struct passwd のメンバ pw_change と pw_expire が int32_t になっているせい?。

/* All elements exactly sized: */
struct passwd {
        char    *pw_name;
        char    *pw_passwd;
        int32_t pw_uid;
        int32_t pw_gid;
        int32_t pw_change;
        char    *pw_class;
        char    *pw_gecos;
        char    *pw_dir;
        char    *pw_shell;
        int32_t pw_expire;
};

で、元の src/include/pwd.h では該当メンバは time_t 型。

struct passwd {
        __aconst char *pw_name;         /* user name */
        __aconst char *pw_passwd;       /* encrypted password */
        uid_t          pw_uid;          /* user uid */
        gid_t          pw_gid;          /* user gid */
        time_t         pw_change;       /* password change time */
        __aconst char *pw_class;        /* user login class */
        __aconst char *pw_gecos;        /* general information */
        __aconst char *pw_dir;          /* home directory */
        __aconst char *pw_shell;        /* default shell */
        time_t         pw_expire;       /* account expiration */
};
広告を非表示にする