pam/dlopen.sh

76 lines
1.3 KiB
Bash
Raw Permalink Normal View History

auto-import changelog data from pam-0.77-15.src.rpm Thu Oct 23 2003 Nalin Dahyabhai <nalin@redhat.com> 0.77-15 - don't install _pam_aconf.h -- apps don't use it, other PAM headers which are installed don't use it, and its contents may be different for arches on a multilib system - check for linkage problems in modules at %install-time (kill #107093 dead) - add buildprereq on flex (#101563) Wed Oct 22 2003 Nalin Dahyabhai <nalin@redhat.com> - make pam_pwdb.so link with libnsl again so that it loads (#107093) - remove now-bogus buildprereq on db4-devel (we use a bundled copy for pam_userdb to avoid symbol collisions with other db libraries in apps) Mon Oct 20 2003 Dan Walsh <dwalsh@redhat.com> 0.77-14.sel - Add Russell Coker patch to handle /dev/pty Fri Oct 17 2003 Dan Walsh <dwalsh@redhat.com> 0.77-13.sel - Turn on Selinux Fri Oct 17 2003 Dan Walsh <dwalsh@redhat.com> 0.77-12 - Fix pam_timestamp to work when 0 seconds have elapsed Mon Oct 06 2003 Dan Walsh <dwalsh@redhat.com> 0.77-11 - Turn off selinux Thu Sep 25 2003 Dan Walsh <dwalsh@redhat.com> 0.77-10.sel - Turn on Selinux and remove multiple choice of context. Wed Sep 24 2003 Dan Walsh <dwalsh@redhat.com> 0.77-10 - Turn off selinux Wed Sep 24 2003 Dan Walsh <dwalsh@redhat.com> 0.77-9.sel - Add Russell's patch to check password Wed Sep 17 2003 Dan Walsh <dwalsh@redhat.com> 0.77-8.sel - handle ttys correctly in pam_selinux Fri Sep 05 2003 Dan Walsh <dwalsh@redhat.com> 0.77-7.sel - Clean up memory problems and fix tty handling. Mon Jul 28 2003 Dan Walsh <dwalsh@redhat.com> 0.77-6 - Add manual context selection to pam_selinux Mon Jul 28 2003 Dan Walsh <dwalsh@redhat.com> 0.77-5 - Add pam_selinux Mon Jul 28 2003 Dan Walsh <dwalsh@redhat.com> 0.77-4 - Add SELinux support
2004-09-09 09:54:36 +00:00
#!/bin/sh
tempdir=`mktemp -d /tmp/dlopenXXXXXX`
test -n "$tempdir" || exit 1
cat >> $tempdir/dlopen.c << _EOF
#include <dlfcn.h>
#include <stdio.h>
#include <limits.h>
#include <sys/stat.h>
/* Simple program to see if dlopen() would succeed. */
int main(int argc, char **argv)
{
int i;
struct stat st;
char buf[PATH_MAX];
for (i = 1; i < argc; i++) {
if (dlopen(argv[i], RTLD_NOW)) {
fprintf(stdout, "dlopen() of \"%s\" succeeded.\n",
argv[i]);
} else {
snprintf(buf, sizeof(buf), "./%s", argv[i]);
if ((stat(buf, &st) == 0) && dlopen(buf, RTLD_NOW)) {
fprintf(stdout, "dlopen() of \"./%s\" "
"succeeded.\n", argv[i]);
} else {
fprintf(stdout, "dlopen() of \"%s\" failed: "
"%s\n", argv[i], dlerror());
return 1;
}
}
}
return 0;
}
_EOF
for arg in $@ ; do
case "$arg" in
"")
;;
-I*|-D*|-f*|-m*|-g*|-O*|-W*)
cflags="$cflags $arg"
;;
-l*|-L*)
auto-import changelog data from pam-0.77-15.src.rpm Thu Oct 23 2003 Nalin Dahyabhai <nalin@redhat.com> 0.77-15 - don't install _pam_aconf.h -- apps don't use it, other PAM headers which are installed don't use it, and its contents may be different for arches on a multilib system - check for linkage problems in modules at %install-time (kill #107093 dead) - add buildprereq on flex (#101563) Wed Oct 22 2003 Nalin Dahyabhai <nalin@redhat.com> - make pam_pwdb.so link with libnsl again so that it loads (#107093) - remove now-bogus buildprereq on db4-devel (we use a bundled copy for pam_userdb to avoid symbol collisions with other db libraries in apps) Mon Oct 20 2003 Dan Walsh <dwalsh@redhat.com> 0.77-14.sel - Add Russell Coker patch to handle /dev/pty Fri Oct 17 2003 Dan Walsh <dwalsh@redhat.com> 0.77-13.sel - Turn on Selinux Fri Oct 17 2003 Dan Walsh <dwalsh@redhat.com> 0.77-12 - Fix pam_timestamp to work when 0 seconds have elapsed Mon Oct 06 2003 Dan Walsh <dwalsh@redhat.com> 0.77-11 - Turn off selinux Thu Sep 25 2003 Dan Walsh <dwalsh@redhat.com> 0.77-10.sel - Turn on Selinux and remove multiple choice of context. Wed Sep 24 2003 Dan Walsh <dwalsh@redhat.com> 0.77-10 - Turn off selinux Wed Sep 24 2003 Dan Walsh <dwalsh@redhat.com> 0.77-9.sel - Add Russell's patch to check password Wed Sep 17 2003 Dan Walsh <dwalsh@redhat.com> 0.77-8.sel - handle ttys correctly in pam_selinux Fri Sep 05 2003 Dan Walsh <dwalsh@redhat.com> 0.77-7.sel - Clean up memory problems and fix tty handling. Mon Jul 28 2003 Dan Walsh <dwalsh@redhat.com> 0.77-6 - Add manual context selection to pam_selinux Mon Jul 28 2003 Dan Walsh <dwalsh@redhat.com> 0.77-5 - Add pam_selinux Mon Jul 28 2003 Dan Walsh <dwalsh@redhat.com> 0.77-4 - Add SELinux support
2004-09-09 09:54:36 +00:00
ldflags="$ldflags $arg"
;;
/*)
modules="$modules $arg"
;;
*)
modules="$modules $arg"
;;
esac
done
${CC:-gcc} $RPM_OPT_FLAGS $CFLAGS -o $tempdir/dlopen $cflags $tempdir/dlopen.c $ldflags -ldl
retval=0
for module in $modules ; do
case "$module" in
"")
;;
/*)
$tempdir/dlopen "$module"
retval=$?
;;
*)
$tempdir/dlopen ./"$module"
retval=$?
;;
esac
done
rm -f $tempdir/dlopen $tempdir/dlopen.c
rmdir $tempdir
exit $retval