* [Buildroot] [PATCH 1/2] openssh: add linux-pam support
@ 2012-08-12 17:01 Danomi Manchego
2012-08-12 17:01 ` [Buildroot] [PATCH 2/2] vsftpd: " Danomi Manchego
2012-09-14 9:28 ` [Buildroot] [PATCH 1/2] openssh: " Peter Korsgaard
0 siblings, 2 replies; 5+ messages in thread
From: Danomi Manchego @ 2012-08-12 17:01 UTC (permalink / raw)
To: buildroot
Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
---
package/openssh/openssh.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk
index 0878fce..815ed33 100644
--- a/package/openssh/openssh.mk
+++ b/package/openssh/openssh.mk
@@ -12,6 +12,11 @@ OPENSSH_CONF_OPT = --libexecdir=/usr/lib --disable-lastlog --disable-utmp \
OPENSSH_DEPENDENCIES = zlib openssl
+ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
+OPENSSH_DEPENDENCIES += linux-pam
+OPENSSH_CONF_OPT += --with-pam
+endif
+
define OPENSSH_INSTALL_INITSCRIPT
$(INSTALL) -D -m 755 package/openssh/S50sshd $(TARGET_DIR)/etc/init.d/S50sshd
endef
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] vsftpd: add linux-pam support
2012-08-12 17:01 [Buildroot] [PATCH 1/2] openssh: add linux-pam support Danomi Manchego
@ 2012-08-12 17:01 ` Danomi Manchego
2012-09-12 22:22 ` Peter Korsgaard
2012-09-14 9:28 ` [Buildroot] [PATCH 1/2] openssh: " Peter Korsgaard
1 sibling, 1 reply; 5+ messages in thread
From: Danomi Manchego @ 2012-08-12 17:01 UTC (permalink / raw)
To: buildroot
Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
---
package/vsftpd/vsftpd.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/vsftpd/vsftpd.mk b/package/vsftpd/vsftpd.mk
index ca711bb..ce042c5 100644
--- a/package/vsftpd/vsftpd.mk
+++ b/package/vsftpd/vsftpd.mk
@@ -23,6 +23,11 @@ VSFTPD_DEPENDENCIES += libcap
VSFTPD_LIBS += -lcap
endif
+ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
+VSFTPD_DEPENDENCIES += linux-pam
+VSFTPD_LIBS += -lpam
+endif
+
define VSFTPD_BUILD_CMDS
$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(VSFTPD_LIBS)" -C $(@D)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] vsftpd: add linux-pam support
2012-08-12 17:01 ` [Buildroot] [PATCH 2/2] vsftpd: " Danomi Manchego
@ 2012-09-12 22:22 ` Peter Korsgaard
0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2012-09-12 22:22 UTC (permalink / raw)
To: buildroot
>>>>> "Danomi" == Danomi Manchego <danomimanchego123@gmail.com> writes:
Danomi> Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] openssh: add linux-pam support
2012-08-12 17:01 [Buildroot] [PATCH 1/2] openssh: add linux-pam support Danomi Manchego
2012-08-12 17:01 ` [Buildroot] [PATCH 2/2] vsftpd: " Danomi Manchego
@ 2012-09-14 9:28 ` Peter Korsgaard
2012-09-16 0:18 ` Danomi Manchego
1 sibling, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2012-09-14 9:28 UTC (permalink / raw)
To: buildroot
>>>>> "Danomi" == Danomi Manchego <danomimanchego123@gmail.com> writes:
Danomi> Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Danomi> ---
Danomi> package/openssh/openssh.mk | 5 +++++
Danomi> 1 file changed, 5 insertions(+)
Danomi> diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk
Danomi> index 0878fce..815ed33 100644
Danomi> --- a/package/openssh/openssh.mk
Danomi> +++ b/package/openssh/openssh.mk
Danomi> @@ -12,6 +12,11 @@ OPENSSH_CONF_OPT = --libexecdir=/usr/lib --disable-lastlog --disable-utmp \
Danomi> OPENSSH_DEPENDENCIES = zlib openssl
Danomi> +ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
Danomi> +OPENSSH_DEPENDENCIES += linux-pam
Danomi> +OPENSSH_CONF_OPT += --with-pam
Danomi> +endif
What configurations did you test this with? It seems to break here with
the internal toolchain because pthread.h somehow gets included:
output/host/usr/bin/arm-linux-gcc -pipe -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wno-pointer-sign -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -fno-builtin-memset -I. -I. -DSSHDIR=\"/etc\" -D_PATH_SSH_PROGRAM=\"/usr/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/lib/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/lib/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/lib/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/usr/lib/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c auth-pam.c
auth-pam.c:171: error: static declaration of ?pthread_exit? follows non-static declaration
/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/pthread.h:236: error: previous declaration of ?pthread_exit? was here
auth-pam.c:178: error: conflicting types for ?pthread_create?
/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/pthread.h:227: error: previous declaration of ?pthread_create? was here
auth-pam.c:204: error: conflicting types for ?pthread_cancel?
/home/peko/source/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/pthread.h:487:
error: previous declaration of ?pthread_cancel? was here
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] openssh: add linux-pam support
2012-09-14 9:28 ` [Buildroot] [PATCH 1/2] openssh: " Peter Korsgaard
@ 2012-09-16 0:18 ` Danomi Manchego
0 siblings, 0 replies; 5+ messages in thread
From: Danomi Manchego @ 2012-09-16 0:18 UTC (permalink / raw)
To: buildroot
Hi Peter,
> What configurations did you test this with? It seems to break here with
> the internal toolchain because pthread.h somehow gets included:
All my projects use codesourcery toolchains. Sorry, I don't regularly use
any uclibc
toolchains. However, I gave it a try, and reproduced the breakdown. It
appears
that when PAM is enabled, openssh used a local static definition of the
common
pthread functions. But when a uclibc toolchain is used, somehow pthreads.h
gets
included indirectly. The exported and static definitions clash, causing
the error.
Googling around, it seems that both the openwrt and the oe people have hit
on this problem. The oe people elected to simply force openssh to be
configured
with pam disabled when a uclibc toolchain is used. The openwrt people, on
the other hand, changed all the pthead_*() calls to pthread2_*(). I think
a variant
of the second approach would be best - I added macros above each static
declaration
to map the static definitions (and the subsequent calls) to different,
unique names.
I will resubmit this change as a v2.
Thanks,
Danomi -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120915/993a0426/attachment.html>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-16 0:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-12 17:01 [Buildroot] [PATCH 1/2] openssh: add linux-pam support Danomi Manchego
2012-08-12 17:01 ` [Buildroot] [PATCH 2/2] vsftpd: " Danomi Manchego
2012-09-12 22:22 ` Peter Korsgaard
2012-09-14 9:28 ` [Buildroot] [PATCH 1/2] openssh: " Peter Korsgaard
2012-09-16 0:18 ` Danomi Manchego
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.