diff options
author | Laine Gholson <laine.gholson@gmail.com> | 2016-10-14 20:35:49 -0500 |
---|---|---|
committer | Laine Gholson <laine.gholson@gmail.com> | 2016-10-14 20:35:49 -0500 |
commit | 959f51c150c61d3958c284647fbbab6ea2d201e1 (patch) | |
tree | 2b6ab3c2a210260460c59d74a82337b8a3e5090e /pam-ck-connector | |
parent | d0cb68ada502ae172d188fe84e66c84da4ffe988 (diff) | |
download | ConsoleKit2-959f51c150c61d3958c284647fbbab6ea2d201e1.tar.gz |
Fix pam-ck-connector on musl
Diffstat (limited to 'pam-ck-connector')
-rw-r--r-- | pam-ck-connector/pam-ck-connector.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pam-ck-connector/pam-ck-connector.c b/pam-ck-connector/pam-ck-connector.c index 916b22b..e5dcae9 100644 --- a/pam-ck-connector/pam-ck-connector.c +++ b/pam-ck-connector/pam-ck-connector.c @@ -197,7 +197,8 @@ _util_name_to_uid (const char *username, bufsize = sysconf (_SC_GETPW_R_SIZE_MAX); if (bufsize == -1) { - return res; + // assume 1024, not all systems (e.g musl) have _SC_GETPW_R_SIZE_MAX + bufsize = 1024; } buf = calloc (sizeof (char), bufsize); rc = getpwnam_r (username, &pwd, buf, bufsize, &pwdp); |