mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Fix libpam's linker set stuff to use the new API (unbreak world), and get
rid of gensetdefs from here as well.
This commit is contained in:
parent
59c3f4f7ee
commit
d6be5f6435
2 changed files with 10 additions and 19 deletions
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#ifdef PAM_STATIC
|
||||
|
||||
extern struct linker_set _pam_static_modules;
|
||||
SET_DECLARE(_pam_static_modules, struct pam_module);
|
||||
|
||||
/* Return pointer to data structure used to define a static module */
|
||||
struct pam_module * _pam_open_static_handler(const char *path)
|
||||
|
|
@ -24,8 +24,7 @@ struct pam_module * _pam_open_static_handler(const char *path)
|
|||
int i;
|
||||
const char *clpath = path;
|
||||
char *lpath, *end;
|
||||
struct pam_module **static_modules =
|
||||
(struct pam_module **)_pam_static_modules.ls_items;
|
||||
struct pam_module **static_module;
|
||||
|
||||
if (strchr(clpath, '/')) {
|
||||
/* ignore path and leading "/" */
|
||||
|
|
@ -41,16 +40,17 @@ struct pam_module * _pam_open_static_handler(const char *path)
|
|||
}
|
||||
|
||||
/* now go find the module */
|
||||
for (i = 0; static_modules[i] != NULL; i++) {
|
||||
D(("%s=?%s\n", lpath, static_modules[i]->name));
|
||||
if (static_modules[i]->name &&
|
||||
! strcmp(static_modules[i]->name, lpath)) {
|
||||
break;
|
||||
SET_FOREACH(static_module, _pam_static_modules) {
|
||||
D(("%s=?%s\n", lpath, (*static_module)->name));
|
||||
if ((*static_module)->name &&
|
||||
! strcmp((*static_module)->name, lpath)) {
|
||||
free(lpath);
|
||||
return (*static_module);
|
||||
}
|
||||
}
|
||||
|
||||
free(lpath);
|
||||
return (static_modules[i]);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* Return pointer to function requested from static module
|
||||
|
|
|
|||
|
|
@ -95,16 +95,7 @@ _EXTRADEPEND: pam_static.c
|
|||
CLEANFILES+= setdef0.o _pam_static_modules.o setdef1.o \
|
||||
setdef0.c setdef1.c setdefs.h
|
||||
|
||||
pam_static_modules.o: setdef0.o pam_static.o _pam_static_modules.o setdef1.o
|
||||
${LD} -o ${.TARGET} -r ${.ALLSRC}
|
||||
|
||||
setdef0.o: setdef0.c setdefs.h
|
||||
setdef1.o: setdef1.c setdefs.h
|
||||
|
||||
setdef0.c setdef1.c setdefs.h: _pam_static_modules.o
|
||||
gensetdefs ${.ALLSRC}
|
||||
|
||||
_pam_static_modules.o: ${STATIC_MODULES}
|
||||
pam_static_modules.o: pam_static.o ${STATIC_MODULES}
|
||||
${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC}
|
||||
.else
|
||||
pam_static_modules.o: pam_static.o ${STATIC_MODULES}
|
||||
|
|
|
|||
Loading…
Reference in a new issue