diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2012-03-06 11:52:26 +1100 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2012-03-06 11:52:26 +1100 |
commit | 964619ba615cd6c57070ad59cdcca8f132d9dfb1 (patch) | |
tree | 6fe9bd4c34caf87601967d0269e1a3bdcb1df2c4 /tests/src | |
parent | f98e0dc213df08daf574818fe6833bd3f5e73786 (diff) | |
download | lightdm-964619ba615cd6c57070ad59cdcca8f132d9dfb1.tar.gz |
Fix session wrapper working the same as it did in 1.1.3
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/Makefile.am | 5 | ||||
-rw-r--r-- | tests/src/libsystem.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/src/Makefile.am b/tests/src/Makefile.am index 4c27a1f0..56618af5 100644 --- a/tests/src/Makefile.am +++ b/tests/src/Makefile.am @@ -3,7 +3,10 @@ dist_noinst_SCRIPTS = lightdm-session noinst_LTLIBRARIES = libsystem.la libsystem_la_SOURCES = libsystem.c -libsystem_la_CFLAGS = $(GLIB_CFLAGS) +libsystem_la_CFLAGS = \ + $(GLIB_CFLAGS) \ + -DSRCDIR=\"$(abs_top_srcdir)\" \ + -DBUILDDIR=\"$(abs_top_builddir)\" libsystem_la_LIBADD = -ldl $(GLIB_LIBS) # This is required to have autotools generate a library that is not installed diff --git a/tests/src/libsystem.c b/tests/src/libsystem.c index 1ebfb082..fde2cec8 100644 --- a/tests/src/libsystem.c +++ b/tests/src/libsystem.c @@ -582,9 +582,16 @@ pam_chauthtok (pam_handle_t *pamh, int flags) int pam_setcred (pam_handle_t *pamh, int flags) { + gchar *e; + if (pamh == NULL) return PAM_SYSTEM_ERR; + /* Put the test directories into the path */ + e = g_strdup_printf ("PATH=%s/tests/src/.libs:%s/tests/src:%s/tests/src:%s/src:%s", BUILDDIR, BUILDDIR, SRCDIR, BUILDDIR, pam_getenv (pamh, "PATH")); + pam_putenv (pamh, e); + g_free (e); + return PAM_SUCCESS; } |