diff mbox

[OpenWrt-Devel,2/6] dropbear: Make utmp and putuline support configurable via seperate config options

Message ID 1461748442-9469-2-git-send-email-dedeckeh@gmail.com
State Changes Requested
Headers show

Commit Message

Hans Dedecker April 27, 2016, 9:13 a.m. UTC
Utmp support tracks who is currenlty logged in by logging info to the file /var/run/utmp (supported by busybox)
Putuline support will use the utmp structure to write to the utmp file

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
---
 package/network/services/dropbear/Config.in | 15 +++++++++++++++
 package/network/services/dropbear/Makefile  |  5 ++---
 2 files changed, 17 insertions(+), 3 deletions(-)

Comments

John Crispin April 29, 2016, 11:24 a.m. UTC | #1
Hi,

comment inline

On 27/04/2016 11:13, Hans Dedecker wrote:
> Utmp support tracks who is currenlty logged in by logging info to the file /var/run/utmp (supported by busybox)
> Putuline support will use the utmp structure to write to the utmp file
> 
> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
> ---
>  package/network/services/dropbear/Config.in | 15 +++++++++++++++
>  package/network/services/dropbear/Makefile  |  5 ++---
>  2 files changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/package/network/services/dropbear/Config.in b/package/network/services/dropbear/Config.in
> index 3316c84..7c2edd7 100644
> --- a/package/network/services/dropbear/Config.in
> +++ b/package/network/services/dropbear/Config.in
> @@ -32,4 +32,19 @@ config DROPBEAR_ECC
>  
>  		Increases binary size by about 23 kB (MIPS).
>  
> +config DROPBEAR_UTMP
> +	bool "Utmp support"
> +	default n
> +	depends on BUSYBOX_CONFIG_FEATURE_UTMP
> +	help
> +		This enables dropbear utmp support, the file /var/run/utmp is used to
> +		track who is currently logged in.
> +
> +config DROPBEAR_PUTUTLINE
> +	bool "Pututline support"
> +	default n
> +	depends on DROPBEAR_UTMP
> +	help
> +		Dropbear will use pututline() to write the utmp structure into the utmp file.
> +
>  endmenu
> diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
> index 39ab04b..593e0a8 100644
> --- a/package/network/services/dropbear/Makefile
> +++ b/package/network/services/dropbear/Makefile
> @@ -68,12 +68,11 @@ CONFIGURE_ARGS += \
>  	--enable-syslog \
>  	$(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \
>  	--disable-lastlog \
> -	--disable-utmp \
> -	--disable-utmpx \
> +	$(if $(CONFIG_DROPBEAR_UTMP),,--disable-utmp) \

what happened to --disable-utmpx ?

	John

>  	--disable-wtmp \
>  	--disable-wtmpx \
>  	--disable-loginfunc \
> -	--disable-pututline \
> +	$(if $(CONFIG_DROPBEAR_PUTUTLINE),,--disable-pututline) \
>  	--disable-pututxline \
>  	--disable-zlib \
>  	--enable-bundled-libtom
>
Hans Dedecker April 29, 2016, 11:46 a.m. UTC | #2
On Fri, Apr 29, 2016 at 1:24 PM, John Crispin <john@phrozen.org> wrote:

> Hi,
>
> comment inline
>
> On 27/04/2016 11:13, Hans Dedecker wrote:
> > Utmp support tracks who is currenlty logged in by logging info to the
> file /var/run/utmp (supported by busybox)
> > Putuline support will use the utmp structure to write to the utmp file
> >
> > Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
> > ---
> >  package/network/services/dropbear/Config.in | 15 +++++++++++++++
> >  package/network/services/dropbear/Makefile  |  5 ++---
> >  2 files changed, 17 insertions(+), 3 deletions(-)
> >
> > diff --git a/package/network/services/dropbear/Config.in
> b/package/network/services/dropbear/Config.in
> > index 3316c84..7c2edd7 100644
> > --- a/package/network/services/dropbear/Config.in
> > +++ b/package/network/services/dropbear/Config.in
> > @@ -32,4 +32,19 @@ config DROPBEAR_ECC
> >
> >               Increases binary size by about 23 kB (MIPS).
> >
> > +config DROPBEAR_UTMP
> > +     bool "Utmp support"
> > +     default n
> > +     depends on BUSYBOX_CONFIG_FEATURE_UTMP
> > +     help
> > +             This enables dropbear utmp support, the file /var/run/utmp
> is used to
> > +             track who is currently logged in.
> > +
> > +config DROPBEAR_PUTUTLINE
> > +     bool "Pututline support"
> > +     default n
> > +     depends on DROPBEAR_UTMP
> > +     help
> > +             Dropbear will use pututline() to write the utmp structure
> into the utmp file.
> > +
> >  endmenu
> > diff --git a/package/network/services/dropbear/Makefile
> b/package/network/services/dropbear/Makefile
> > index 39ab04b..593e0a8 100644
> > --- a/package/network/services/dropbear/Makefile
> > +++ b/package/network/services/dropbear/Makefile
> > @@ -68,12 +68,11 @@ CONFIGURE_ARGS += \
> >       --enable-syslog \
> >       $(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \
> >       --disable-lastlog \
> > -     --disable-utmp \
> > -     --disable-utmpx \
> > +     $(if $(CONFIG_DROPBEAR_UTMP),,--disable-utmp) \
>
> what happened to --disable-utmpx ?
>
Deletion by mistake ...
Will fix it in a new patch

Hans

>
>         John
>
> >       --disable-wtmp \
> >       --disable-wtmpx \
> >       --disable-loginfunc \
> > -     --disable-pututline \
> > +     $(if $(CONFIG_DROPBEAR_PUTUTLINE),,--disable-pututline) \
> >       --disable-pututxline \
> >       --disable-zlib \
> >       --enable-bundled-libtom
> >
>
diff mbox

Patch

diff --git a/package/network/services/dropbear/Config.in b/package/network/services/dropbear/Config.in
index 3316c84..7c2edd7 100644
--- a/package/network/services/dropbear/Config.in
+++ b/package/network/services/dropbear/Config.in
@@ -32,4 +32,19 @@  config DROPBEAR_ECC
 
 		Increases binary size by about 23 kB (MIPS).
 
+config DROPBEAR_UTMP
+	bool "Utmp support"
+	default n
+	depends on BUSYBOX_CONFIG_FEATURE_UTMP
+	help
+		This enables dropbear utmp support, the file /var/run/utmp is used to
+		track who is currently logged in.
+
+config DROPBEAR_PUTUTLINE
+	bool "Pututline support"
+	default n
+	depends on DROPBEAR_UTMP
+	help
+		Dropbear will use pututline() to write the utmp structure into the utmp file.
+
 endmenu
diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index 39ab04b..593e0a8 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -68,12 +68,11 @@  CONFIGURE_ARGS += \
 	--enable-syslog \
 	$(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \
 	--disable-lastlog \
-	--disable-utmp \
-	--disable-utmpx \
+	$(if $(CONFIG_DROPBEAR_UTMP),,--disable-utmp) \
 	--disable-wtmp \
 	--disable-wtmpx \
 	--disable-loginfunc \
-	--disable-pututline \
+	$(if $(CONFIG_DROPBEAR_PUTUTLINE),,--disable-pututline) \
 	--disable-pututxline \
 	--disable-zlib \
 	--enable-bundled-libtom