All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] dropbear: Change the path to find configuration file and add s configuration file for dropbear
@ 2011-08-29 10:48 Xiaofeng Yan
  2011-08-29 10:48 ` [PATCH 1/1] dropbear: Change the path to find configuration file and add a " Xiaofeng Yan
  0 siblings, 1 reply; 6+ messages in thread
From: Xiaofeng Yan @ 2011-08-29 10:48 UTC (permalink / raw)
  To: openembedded-core

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

dropbear will check "/etc/pam.d/sshd" which comes from package "openssh" \
When enabling pam supporting. But if we only install dropbear \
package without package "openssh", then "dropbear" will not \
find a configuration file. The changes are as follow for fixing this bug:
- Change the path to find configuration file (/etc/pam.d/sshd --> /etc/pam.d/dropbear)
- Add configuration file "/etc/pam.d/dropbear"

Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: xiaofeng/dropbear
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=xiaofeng/dropbear

Thanks,
    Xiaofeng Yan <xiaofeng.yan@windriver.com>
---


Xiaofeng Yan (1):
  dropbear: Change the path to find configuration file and add a 
    configuration file for dropbear

 meta/recipes-core/dropbear/dropbear.inc            |    6 +++++-
 meta/recipes-core/dropbear/dropbear/dropbear       |    4 ++++
 .../dropbear/dropbear-configuration-file.patch     |   18 ++++++++++++++++++
 3 files changed, 27 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/dropbear/dropbear/dropbear
 create mode 100644 meta/recipes-core/dropbear/dropbear/dropbear-configuration-file.patch




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] dropbear: Change the path to find configuration file and add a configuration file for dropbear
  2011-08-29 10:48 [PATCH 0/1] dropbear: Change the path to find configuration file and add s configuration file for dropbear Xiaofeng Yan
@ 2011-08-29 10:48 ` Xiaofeng Yan
  2011-08-29 12:54   ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Xiaofeng Yan @ 2011-08-29 10:48 UTC (permalink / raw)
  To: openembedded-core

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

dropbear will check "/etc/pam.d/sshd" which comes from package "openssh" \
When enabling pam supporting. But if we only install dropbear \
package without package "openssh", then "dropbear" will not \
find a configuration file. The changes are as follow for fixing this bug:

- Change the path to find configuration file (/etc/pam.d/sshd --> /etc/pam.d/dropbear)
- Add a configuration file "/etc/pam.d/dropbear"

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/recipes-core/dropbear/dropbear.inc            |    6 +++++-
 meta/recipes-core/dropbear/dropbear/dropbear       |    4 ++++
 .../dropbear/dropbear-configuration-file.patch     |   18 ++++++++++++++++++
 3 files changed, 27 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/dropbear/dropbear/dropbear
 create mode 100644 meta/recipes-core/dropbear/dropbear/dropbear-configuration-file.patch

diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index 5af9ebd..577b288 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -19,7 +19,9 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.gz \
 	         file://init \
                  ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} "
 
-PAM_SRC_URI = "file://dropbear-enable-pam.patch"
+PAM_SRC_URI = "file://dropbear-enable-pam.patch \
+               file://dropbear-configuration-file.patch \
+               file://dropbear"
 
 inherit autotools update-rc.d
 
@@ -51,6 +53,7 @@ do_install() {
 		   ${D}${sysconfdir}/init.d \
 		   ${D}${sysconfdir}/default \
 		   ${D}${sysconfdir}/dropbear \
+		   ${D}${sysconfdir}/pam.d \
                    ${D}${bindir} \
 		   ${D}${sbindir} \
 		   ${D}${localstatedir}
@@ -68,6 +71,7 @@ do_install() {
 				  -e 's,/usr/bin,${bindir},g' \
 				  -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/dropbear
 	chmod 755 ${D}${sysconfdir}/init.d/dropbear
+	install -m 0644 ${WORKDIR}/dropbear  ${D}${sysconfdir}/pam.d/
 }
 
 pkg_postinst_${PN} () {
diff --git a/meta/recipes-core/dropbear/dropbear/dropbear b/meta/recipes-core/dropbear/dropbear/dropbear
new file mode 100644
index 0000000..47e787f
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/dropbear
@@ -0,0 +1,4 @@
+#%PAM-1.0
+
+auth     include  common-auth
+account  include  common-account
diff --git a/meta/recipes-core/dropbear/dropbear/dropbear-configuration-file.patch b/meta/recipes-core/dropbear/dropbear/dropbear-configuration-file.patch
new file mode 100644
index 0000000..5e94553
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/dropbear-configuration-file.patch
@@ -0,0 +1,18 @@
+dropbear: Change the path ("/etc/pam.d/sshd" as default) to find a pam configuration file \
+to "/etc/pam.d/dropbear for dropbear when enabling pam supporting" 
+
+Upstream-Status: Inappropriate [configuration] 
+
+Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
+
+--- a/svr-authpam.c	2008-11-11 22:09:03.000000000 +0800
++++ b/svr-authpam.c.new	2011-08-29 09:53:24.000000000 +0800
+@@ -199,7 +199,7 @@
+ 	userData.passwd = password;
+ 
+ 	/* Init pam */
+-	if ((rc = pam_start("sshd", NULL, &pamConv, &pamHandlep)) != PAM_SUCCESS) {
++	if ((rc = pam_start("dropbear", NULL, &pamConv, &pamHandlep)) != PAM_SUCCESS) {
+ 		dropbear_log(LOG_WARNING, "pam_start() failed, rc=%d, %s\n", 
+ 				rc, pam_strerror(pamHandlep, rc));
+ 		goto cleanup;
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] dropbear: Change the path to find configuration file and add a configuration file for dropbear
  2011-08-29 10:48 ` [PATCH 1/1] dropbear: Change the path to find configuration file and add a " Xiaofeng Yan
@ 2011-08-29 12:54   ` Richard Purdie
  2011-08-31  2:13     ` Xiaofeng Yan
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2011-08-29 12:54 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-08-29 at 18:48 +0800, Xiaofeng Yan wrote:
> From: Xiaofeng Yan <xiaofeng.yan@windriver.com>
> 
> dropbear will check "/etc/pam.d/sshd" which comes from package "openssh" \
> When enabling pam supporting. But if we only install dropbear \
> package without package "openssh", then "dropbear" will not \
> find a configuration file. The changes are as follow for fixing this bug:
> 
> - Change the path to find configuration file (/etc/pam.d/sshd --> /etc/pam.d/dropbear)
> - Add a configuration file "/etc/pam.d/dropbear"
> 
> Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
> ---
>  meta/recipes-core/dropbear/dropbear.inc            |    6 +++++-
>  meta/recipes-core/dropbear/dropbear/dropbear       |    4 ++++
>  .../dropbear/dropbear-configuration-file.patch     |   18 ++++++++++++++++++
>  3 files changed, 27 insertions(+), 1 deletions(-)
>  create mode 100644 meta/recipes-core/dropbear/dropbear/dropbear
>  create mode 100644 meta/recipes-core/dropbear/dropbear/dropbear-configuration-file.patch
> 
> diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
> index 5af9ebd..577b288 100644
> --- a/meta/recipes-core/dropbear/dropbear.inc
> +++ b/meta/recipes-core/dropbear/dropbear.inc
> @@ -19,7 +19,9 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.gz \
>  	         file://init \
>                   ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} "
>  
> -PAM_SRC_URI = "file://dropbear-enable-pam.patch"
> +PAM_SRC_URI = "file://dropbear-enable-pam.patch \
> +               file://dropbear-configuration-file.patch \
> +               file://dropbear"
>  
>  inherit autotools update-rc.d
>  
> @@ -51,6 +53,7 @@ do_install() {
>  		   ${D}${sysconfdir}/init.d \
>  		   ${D}${sysconfdir}/default \
>  		   ${D}${sysconfdir}/dropbear \
> +		   ${D}${sysconfdir}/pam.d \
>                     ${D}${bindir} \
>  		   ${D}${sbindir} \
>  		   ${D}${localstatedir}
> @@ -68,6 +71,7 @@ do_install() {
>  				  -e 's,/usr/bin,${bindir},g' \
>  				  -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/dropbear
>  	chmod 755 ${D}${sysconfdir}/init.d/dropbear
> +	install -m 0644 ${WORKDIR}/dropbear  ${D}${sysconfdir}/pam.d/

I suspect this won't build in the DISTRO_FEATURES not containing pam
case due to the above file not existing. Please put a check in there to
see if it exists.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] dropbear: Change the path to find configuration file and add a configuration file for dropbear
  2011-08-29 12:54   ` Richard Purdie
@ 2011-08-31  2:13     ` Xiaofeng Yan
  0 siblings, 0 replies; 6+ messages in thread
From: Xiaofeng Yan @ 2011-08-31  2:13 UTC (permalink / raw)
  To: openembedded-core

On 2011年08月29日 20:54, Richard Purdie wrote:
> On Mon, 2011-08-29 at 18:48 +0800, Xiaofeng Yan wrote:
>> From: Xiaofeng Yan<xiaofeng.yan@windriver.com>
>>
>> dropbear will check "/etc/pam.d/sshd" which comes from package "openssh" \
>> When enabling pam supporting. But if we only install dropbear \
>> package without package "openssh", then "dropbear" will not \
>> find a configuration file. The changes are as follow for fixing this bug:
>>
>> - Change the path to find configuration file (/etc/pam.d/sshd -->  /etc/pam.d/dropbear)
>> - Add a configuration file "/etc/pam.d/dropbear"
>>
>> Signed-off-by: Xiaofeng Yan<xiaofeng.yan@windriver.com>
>> ---
>>   meta/recipes-core/dropbear/dropbear.inc            |    6 +++++-
>>   meta/recipes-core/dropbear/dropbear/dropbear       |    4 ++++
>>   .../dropbear/dropbear-configuration-file.patch     |   18 ++++++++++++++++++
>>   3 files changed, 27 insertions(+), 1 deletions(-)
>>   create mode 100644 meta/recipes-core/dropbear/dropbear/dropbear
>>   create mode 100644 meta/recipes-core/dropbear/dropbear/dropbear-configuration-file.patch
>>
>> diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
>> index 5af9ebd..577b288 100644
>> --- a/meta/recipes-core/dropbear/dropbear.inc
>> +++ b/meta/recipes-core/dropbear/dropbear.inc
>> @@ -19,7 +19,9 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.gz \
>>   	         file://init \
>>                    ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} "
>>
>> -PAM_SRC_URI = "file://dropbear-enable-pam.patch"
>> +PAM_SRC_URI = "file://dropbear-enable-pam.patch \
>> +               file://dropbear-configuration-file.patch \
>> +               file://dropbear"
>>
>>   inherit autotools update-rc.d
>>
>> @@ -51,6 +53,7 @@ do_install() {
>>   		   ${D}${sysconfdir}/init.d \
>>   		   ${D}${sysconfdir}/default \
>>   		   ${D}${sysconfdir}/dropbear \
>> +		   ${D}${sysconfdir}/pam.d \
>>                      ${D}${bindir} \
>>   		   ${D}${sbindir} \
>>   		   ${D}${localstatedir}
>> @@ -68,6 +71,7 @@ do_install() {
>>   				  -e 's,/usr/bin,${bindir},g' \
>>   				  -e 's,/usr,${prefix},g'>  ${D}${sysconfdir}/init.d/dropbear
>>   	chmod 755 ${D}${sysconfdir}/init.d/dropbear
>> +	install -m 0644 ${WORKDIR}/dropbear  ${D}${sysconfdir}/pam.d/
> I suspect this won't build in the DISTRO_FEATURES not containing pam
> case due to the above file not existing. Please put a check in there to
> see if it exists.
>
Sorry for my fault. you are a really careful man. I will modify my fault.

Thanks
Yan
> Cheers,
>
> Richard
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] dropbear: Change the path to find configuration file and add a configuration file for dropbear
  2011-08-31  2:48 ` [PATCH 1/1] " Xiaofeng Yan
@ 2011-08-31 18:56   ` Richard Purdie
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2011-08-31 18:56 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, 2011-08-31 at 10:48 +0800, Xiaofeng Yan wrote:
> From: Xiaofeng Yan <xiaofeng.yan@windriver.com>
> 
> dropbear will check "/etc/pam.d/sshd" which comes from package "openssh" \
> When enabling pam supporting. But if we only install dropbear \
> package without package "openssh", then "dropbear" will not \
> find a configuration file.
> The changes are as follow for fixing this bug:
> 
> - Change the path to find configuration file (/etc/pam.d/sshd --> /etc/pam.d/dropbear)
> - Add a configuration file "/etc/pam.d/dropbear"
> 
> Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
> ---
>  meta/recipes-core/dropbear/dropbear.inc |   12 +++++++++++-
>  1 files changed, 11 insertions(+), 1 deletions(-)

Merged to master, thanks.

Richard




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] dropbear: Change the path to find configuration file and add a configuration file for dropbear
  2011-08-31  2:48 [PATCH 0/1] " Xiaofeng Yan
@ 2011-08-31  2:48 ` Xiaofeng Yan
  2011-08-31 18:56   ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Xiaofeng Yan @ 2011-08-31  2:48 UTC (permalink / raw)
  To: openembedded-core

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

dropbear will check "/etc/pam.d/sshd" which comes from package "openssh" \
When enabling pam supporting. But if we only install dropbear \
package without package "openssh", then "dropbear" will not \
find a configuration file.
The changes are as follow for fixing this bug:

- Change the path to find configuration file (/etc/pam.d/sshd --> /etc/pam.d/dropbear)
- Add a configuration file "/etc/pam.d/dropbear"

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/recipes-core/dropbear/dropbear.inc |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index 5af9ebd..1582f2e 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -19,7 +19,9 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.gz \
 	         file://init \
                  ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} "
 
-PAM_SRC_URI = "file://dropbear-enable-pam.patch"
+PAM_SRC_URI = "file://dropbear-enable-pam.patch \
+               file://dropbear-configuration-file.patch \
+               file://dropbear"
 
 inherit autotools update-rc.d
 
@@ -68,6 +70,14 @@ do_install() {
 				  -e 's,/usr/bin,${bindir},g' \
 				  -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/dropbear
 	chmod 755 ${D}${sysconfdir}/init.d/dropbear
+	for i in ${DISTRO_FEATURES};
+	do
+		if [ ${i} = "pam" ];  then
+			install -d ${D}${sysconfdir}/pam.d
+			install -m 0644 ${WORKDIR}/dropbear  ${D}${sysconfdir}/pam.d/
+		fi
+	done
+
 }
 
 pkg_postinst_${PN} () {
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-31 19:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-29 10:48 [PATCH 0/1] dropbear: Change the path to find configuration file and add s configuration file for dropbear Xiaofeng Yan
2011-08-29 10:48 ` [PATCH 1/1] dropbear: Change the path to find configuration file and add a " Xiaofeng Yan
2011-08-29 12:54   ` Richard Purdie
2011-08-31  2:13     ` Xiaofeng Yan
2011-08-31  2:48 [PATCH 0/1] " Xiaofeng Yan
2011-08-31  2:48 ` [PATCH 1/1] " Xiaofeng Yan
2011-08-31 18:56   ` Richard Purdie

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.