tags 777965 + patch thanks Here is a patch to mark the non-standard function identifier __FUNCTION__ with the __extension__ keyword to work around the build failure with GCC-5.
-- Linn Crosetto Linux for HP Helion
diff -urN b/pam_chroot.c c/pam_chroot.c --- b/pam_chroot.c 2015-07-09 18:32:03.976756516 +0000 +++ c/pam_chroot.c 2015-07-09 18:31:05.704637578 +0000 @@ -68,7 +68,7 @@ /* initialize opts to a standard known state */ int _pam_opts_init(struct _pam_opts* opts) { if(NULL == opts) { - _pam_log(LOG_ERR, "%s: NULL opts pointer", __FUNCTION__); + _pam_log(LOG_ERR, "%s: NULL opts pointer", __extension__ __FUNCTION__); return _PAM_CHROOT_INTERNALERR; } @@ -91,7 +91,7 @@ int i; if(NULL == opts) { - _pam_log(LOG_ERR, "%s: NULL opts pointer", __FUNCTION__); + _pam_log(LOG_ERR, "%s: NULL opts pointer", __extension__ __FUNCTION__); return _PAM_CHROOT_INTERNALERR; } @@ -162,7 +162,7 @@ /* free the allocated memory of a struct _pam_opts */ int _pam_opts_free(struct _pam_opts* opts) { if(NULL == opts) { - _pam_log(LOG_ERR, "%s: NULL opts pointer", __FUNCTION__); + _pam_log(LOG_ERR, "%s: NULL opts pointer", __extension__ __FUNCTION__); } _pam_drop(opts->chroot_dir); _pam_drop(opts->conf); @@ -261,19 +261,19 @@ gids = (gid_t*) malloc(ngroups*sizeof(gid_t)); if(NULL == gids) { _pam_log(LOG_ERR, "%s: %s: malloc: %s", - opts->module, __FUNCTION__, strerror(errno)); + opts->module, __extension__ __FUNCTION__, strerror(errno)); return NULL; } ret = _PAM_GETUGROUPS(pwd->pw_name, pwd->pw_gid, gids, &ngroups); if(-1 == ret) { _pam_log(LOG_WARNING, "%s: %s: _PAM_GETUGROUPS found more gids on second run", - opts->module, __FUNCTION__); + opts->module, __extension__ __FUNCTION__); } if(0 >= ngroups) { _pam_log(LOG_ERR, "%s: %s: _PAM_GETUGROUPS returned no groups for user \"%s\"", - opts->module, __FUNCTION__, user); + opts->module, __extension__ __FUNCTION__, user); _pam_drop(gids); return NULL; } @@ -282,7 +282,7 @@ groups = (char**)malloc((ngroups+1)*sizeof(char*)); if(NULL == groups) { _pam_log(LOG_ERR, "%s: %s: malloc: %s", - opts->module, __FUNCTION__, strerror(errno)); + opts->module, __extension__ __FUNCTION__, strerror(errno)); _pam_drop(gids); return NULL; } @@ -533,7 +533,7 @@ char *errbuf = malloc(len); if(NULL == errbuf) { _pam_log(LOG_ERR, "%s: %s: malloc: %s", - opts->module, __FUNCTION__, strerror(errno)); + opts->module, __extension__ __FUNCTION__, strerror(errno)); if(opts->flags & _PAM_OPTS_USE_GROUPS) { _pam_free_groups(group_list); }