rpms/dropbear/devel dropbear-0.50-loginrec-open-modes.diff, NONE, 1.1 dropbear.init, NONE, 1.1 dropbear.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Lennert Buytenhek (buytenh)
fedora-extras-commits at redhat.com
Tue Jan 15 09:47:08 UTC 2008
- Previous message (by thread): devel/libcap libcap.spec,1.28,1.29
- Next message (by thread): rpms/man-pages-cs/devel .cvsignore, 1.5, 1.6 man-pages-cs-0.17-noMANDIR.patch, 1.1, 1.2 man-pages-cs.spec, 1.16, 1.17 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: buytenh
Update of /cvs/pkgs/rpms/dropbear/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3830/devel
Modified Files:
.cvsignore sources
Added Files:
dropbear-0.50-loginrec-open-modes.diff dropbear.init
dropbear.spec
Log Message:
Initial import of the dropbear package.
dropbear-0.50-loginrec-open-modes.diff:
--- NEW FILE dropbear-0.50-loginrec-open-modes.diff ---
--- dropbear-0.50/loginrec.c.orig 2007-08-08 17:39:37.000000000 +0200
+++ dropbear-0.50/loginrec.c 2008-01-07 11:13:13.000000000 +0100
@@ -1313,7 +1313,7 @@
/* open the file (using filemode) and seek to the login entry */
static int
-lastlog_openseek(struct logininfo *li, int *fd, int filemode)
+lastlog_openseek(struct logininfo *li, int *fd, int flags, mode_t mode)
{
off_t offset;
int type;
@@ -1334,7 +1334,7 @@
return 0;
}
- *fd = open(lastlog_file, filemode);
+ *fd = open(lastlog_file, flags, mode);
if ( *fd < 0) {
dropbear_log(LOG_INFO, "lastlog_openseek: Couldn't open %s: %s",
lastlog_file, strerror(errno));
@@ -1364,7 +1364,7 @@
/* create our struct lastlog */
lastlog_construct(li, &last);
- if (!lastlog_openseek(li, &fd, O_RDWR|O_CREAT))
+ if (!lastlog_openseek(li, &fd, O_RDWR|O_CREAT, 0644))
return(0);
/* write the entry */
--- NEW FILE dropbear.init ---
#!/bin/bash
#
# Init file for dropbear SSH server daemon
#
# chkconfig: - 55 25
# description: dropbear SSH server daemon
#
# processname: dropbear
# config: /etc/dropbear/dropbear_dss_host_key
# config: /etc/dropbear/dropbear_rsa_host_key
# pidfile: /var/run/dropbear.pid
# source function library
. /etc/rc.d/init.d/functions
# pull in sysconfig settings
[ -f /etc/sysconfig/dropbear ] && . /etc/sysconfig/dropbear
RETVAL=0
prog="dropbear"
# Some functions to make the below more readable
KEYGEN=/usr/bin/dropbearkey
DROPBEAR=/usr/sbin/dropbear
RSA_KEY=/etc/dropbear/dropbear_rsa_host_key
DSS_KEY=/etc/dropbear/dropbear_dss_host_key
PID_FILE=/var/run/dropbear.pid
runlevel=$(set -- $(runlevel); eval "echo \$$#" )
do_rsa_keygen() {
if [ ! -s $RSA_KEY ]; then
echo -n $"Generating dropbear RSA host key: "
if $KEYGEN -t rsa -f $RSA_KEY >&/dev/null; then
chmod 600 $RSA_KEY
success $"RSA key generation"
echo
else
failure $"RSA key generation"
echo
exit 1
fi
fi
}
do_dss_keygen() {
if [ ! -s $DSS_KEY ]; then
echo -n $"Generating dropbear DSS host key: "
if $KEYGEN -t dss -f $DSS_KEY >&/dev/null; then
chmod 600 $DSS_KEY
success $"DSS key generation"
echo
else
failure $"DSS key generation"
echo
exit 1
fi
fi
}
start()
{
# Create keys if necessary
if [ "x${AUTOCREATE_SERVER_KEYS}" != xNO ]; then
do_rsa_keygen
do_dss_keygen
fi
echo -n $"Starting $prog: "
$DROPBEAR $OPTIONS && success || failure
RETVAL=$?
[ "$RETVAL" = 0 ] && touch /var/lock/subsys/dropbear
echo
}
stop()
{
echo -n $"Stopping $prog: "
if [ -n "`pidfileofproc $DROPBEAR`" ] ; then
killproc $DROPBEAR
else
failure $"Stopping $prog"
fi
RETVAL=$?
# if we are in halt or reboot runlevel kill all running sessions
# so the TCP connections are closed cleanly
if [ "x$runlevel" = x0 -o "x$runlevel" = x6 ] ; then
killall $prog 2>/dev/null
fi
[ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/dropbear
echo
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
reload)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/dropbear ] ; then
stop
# avoid race
sleep 3
start
fi
;;
status)
status $DROPBEAR
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
RETVAL=1
esac
exit $RETVAL
--- NEW FILE dropbear.spec ---
Name: dropbear
Version: 0.50
Release: 2%{?dist}
Summary: SSH2 server and client
Group: Applications/Internet
License: MIT
URL: http://matt.ucc.asn.au/dropbear/dropbear.html
Source0: http://matt.ucc.asn.au/dropbear/releases/dropbear-%{version}.tar.bz2
Source1: dropbear.init
Patch1: dropbear-0.50-loginrec-open-modes.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: zlib-devel
Requires: initscripts
Requires(post): chkconfig >= 0.9, /sbin/service
%description
Dropbear is a relatively small SSH 2 server and client. Dropbear
is particularly useful for "embedded"-type Linux (or other Unix)
systems, such as wireless routers.
%prep
%setup -q
%patch1 -p1
# convert CHANGES to UTF-8
iconv -f iso-8859-1 -t utf-8 -o CHANGES{.utf8,}
mv CHANGES{.utf8,}
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
install -d $RPM_BUILD_ROOT%{_sysconfdir}/dropbear
install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dropbear
install -d $RPM_BUILD_ROOT%{_mandir}/man1
install -m 0644 dbclient.1 $RPM_BUILD_ROOT%{_mandir}/man1/dbclient.1
install -d $RPM_BUILD_ROOT%{_mandir}/man8
install -m 0644 dropbear.8 $RPM_BUILD_ROOT%{_mandir}/man8/dropbear.8
install -m 0644 dropbearkey.8 $RPM_BUILD_ROOT%{_mandir}/man8/dropbearkey.8
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/chkconfig --add dropbear
%postun
/sbin/service dropbear condrestart > /dev/null 2>&1 || :
%preun
if [ "$1" = 0 ]
then
/sbin/service dropbear stop > /dev/null 2>&1 || :
/sbin/chkconfig --del dropbear
fi
%files
%defattr(-,root,root)
%doc CHANGES INSTALL LICENSE MULTI README SMALL TODO
%attr(0755,root,root) %dir %{_sysconfdir}/dropbear
%attr(0755,root,root) /etc/rc.d/init.d/dropbear
%attr(0755,root,root) %{_bindir}/dropbearkey
%attr(0755,root,root) %{_bindir}/dropbearconvert
%attr(0755,root,root) %{_bindir}/dbclient
%attr(0755,root,root) %{_sbindir}/dropbear
%attr(0644,root,root) %{_mandir}/man1/dbclient.1*
%attr(0644,root,root) %{_mandir}/man8/dropbear.8*
%attr(0644,root,root) %{_mandir}/man8/dropbearkey.8*
%changelog
* Mon Jan 10 2008 Lennert Buytenhek <buytenh at wantstofly.org> - 0.50-2
- Incorporate changes from Fedora package review:
- Use full URL for Source0.
- Ship dropbear.init with mode 0644 in the SRPM.
- Convert CHANGES to utf-8 in %%setup, as the version shipped with
dropbear 0.50 isn't utf-8 clean (it's in iso-8859-1.)
- Add a reload entry to the init script, and don't enable the
service by default.
* Mon Jan 7 2008 Lennert Buytenhek <buytenh at wantstofly.org> - 0.50-1
- Update to 0.50.
- Add init script.
* Fri Aug 3 2007 Lennert Buytenhek <buytenh at wantstofly.org> - 0.49-1
- Initial packaging.
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/dropbear/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 14 Jan 2008 21:49:57 -0000 1.1
+++ .cvsignore 15 Jan 2008 09:46:30 -0000 1.2
@@ -0,0 +1 @@
+dropbear-0.50.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/dropbear/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 14 Jan 2008 21:49:57 -0000 1.1
+++ sources 15 Jan 2008 09:46:30 -0000 1.2
@@ -0,0 +1 @@
+212f519111ef0d5903d25d80b2f418f6 dropbear-0.50.tar.bz2
- Previous message (by thread): devel/libcap libcap.spec,1.28,1.29
- Next message (by thread): rpms/man-pages-cs/devel .cvsignore, 1.5, 1.6 man-pages-cs-0.17-noMANDIR.patch, 1.1, 1.2 man-pages-cs.spec, 1.16, 1.17 sources, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list