initial commit of file from CVS for oidentd on Fri 14 Jul 13:54:02 BST 2023

This commit is contained in:
Brian Read 2023-07-14 13:54:02 +01:00
parent 614ec1fa5f
commit d0e6a19b41
11 changed files with 337 additions and 1 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.tar.gz filter=lfs diff=lfs merge=lfs -text

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.rpm
*.log
*spec-20*

21
Makefile Normal file
View File

@ -0,0 +1,21 @@
# Makefile for source rpm: oidentd
# $Id: Makefile,v 1.1 2016/03/18 07:46:53 unnilennium Exp $
NAME := oidentd
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -1,3 +1,11 @@
# oidentd
3rd Party (Maintained by Koozali) git repo for oidentd smeserver
3rd Party (Maintained by Koozali) git repo for oidentd smeserver
## Description
<br />*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
*Once it has been checked, then this comment will be deleted*
<br />
Oidentd is an open-source, RFC 1413-compliant Ident (RFC 931) server. It is used to provide the user's identity to other clients on the Internet. The software supports a wide range of configurations, including the ability to specify forwarding rules, so that different systems can be identified under different conditions. Additionally, oidentd supports spoofing, which allows users to configure the server to return a specified identity for any incoming request, regardless of the actual identity of the user.

1
contriborbase Normal file
View File

@ -0,0 +1 @@
sme10

76
identd.init Executable file
View File

@ -0,0 +1,76 @@
#! /bin/sh
# $Id: identd.init,v 1.1 2004/02/26 17:54:30 thias Exp $
#
# identd Start/Stop RFC 1413 identd server
#
# chkconfig: 345 35 65
# description: The identd server provides a means to determine the identity \
# of a user of a particular TCP connection. Given a TCP port \
# number pair, it returns a character string which identifies \
# the owner of that connection on the server's system.
# processname: identd
# pidfile: /var/run/identd.pid
# config: /etc/identd.conf
# Source function library.
. /etc/init.d/functions
# Get config.
. /etc/sysconfig/network
# Check that networking is up.
if [ ${NETWORKING} = "no" ]
then
exit 0
fi
[ -x /usr/sbin/oidentd ] || exit 0
IDENTDOPTS="-q -u nobody -g nobody"
RETVAL=0
start() {
echo -n "Starting identd: "
daemon /usr/sbin/oidentd $IDENTDOPTS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/identd
return $RETVAL
}
stop() {
echo -n "Stopping identd services: "
killproc oidentd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/identd
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status oidentd
;;
restart|reload)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/identd ]; then
stop
start
fi
;;
*)
echo "Usage: identd {start|stop|status|restart|reload|condrestart}"
exit 1
esac
exit $RETVAL

3
identd.spoof Normal file
View File

@ -0,0 +1,3 @@
root
#user2
nobody:UNKNOWN

View File

@ -0,0 +1,44 @@
diff -ur oidentd.orig/src/kernel/linux.c oidentd-2.0.8/src/kernel/linux.c
--- oidentd.orig/src/kernel/linux.c 2006-05-22 06:58:53.000000000 +0300
+++ oidentd-2.0.8/src/kernel/linux.c 2007-07-11 21:28:56.000000000 +0300
@@ -48,6 +48,7 @@
#define CFILE6 "/proc/net/tcp6"
#define MASQFILE "/proc/net/ip_masquerade"
#define CONNTRACK "/proc/net/ip_conntrack"
+#define NFCONNTRACK "/proc/net/nf_conntrack"
static int netlink_sock;
extern struct sockaddr_storage proxy;
@@ -82,7 +83,15 @@
debug("fopen: %s: %s", CONNTRACK, strerror(errno));
return false;
}
- masq_fp = fopen("/dev/null", "r");
+
+ masq_fp = fopen(NFCONNTRACK, "r");
+ if (masq_fp == NULL) {
+ if (errno != ENOENT) {
+ debug("fopen: %s: %s", NFCONNTRACK, strerror(errno));
+ return false;
+ }
+ masq_fp = fopen("/dev/null", "r");
+ }
}
netfilter = true;
@@ -367,6 +376,15 @@
&nport_temp, &mport_temp);
}
+ if (ret != 21) {
+ ret = sscanf(buf,
+ "%*15s %*d %15s %*d %*d ESTABLISHED src=%d.%d.%d.%d dst=%d.%d.%d.%d sport=%d dport=%d packets=%*d bytes=%*d src=%d.%d.%d.%d dst=%d.%d.%d.%d sport=%d dport=%d",
+ proto, &l1, &l2, &l3, &l4, &r1, &r2, &r3, &r4,
+ &masq_lport_temp, &masq_fport_temp,
+ &nl1, &nl2, &nl3, &nl4, &nr1, &nr2, &nr3, &nr4,
+ &nport_temp, &mport_temp);
+ }
+
if (ret != 21)
continue;

BIN
oidentd-2.0.8.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

167
oidentd.spec Normal file
View File

@ -0,0 +1,167 @@
# $Id: oidentd.spec 7981 2009-11-03 03:05:34Z dag $
# Authority: matthias
# Upstream: Ryan McCabe <ryan$numb,org>
Summary: Implementation of the RFC1413 identification server
Name: oidentd
%define version 2.0.8
%define release 4
Version: %{version}
Release: %{release}%{?dist}
License: GPL
Group: System Environment/Daemons
URL: http://ojnk.sourceforge.net/
Packager: Dag Wieers <dag@wieers.com>
Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
Source0: http://dl.sf.net/ojnk/oidentd-%{version}.tar.gz
Source1: identd.init
Source2: identd.spoof
Source3: oidentd.users
Patch0: oidentd-2.0.8-linux-2.6.21.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service, /sbin/chkconfig
Requires(postun): /sbin/service
BuildRequires: byacc
BuildRequires: bison, flex
Provides: identd = %{version}
Conflicts: pidentd
%description
The oidentd package contains identd, which implements the RFC1413
identification server. Identd looks up specific TCP/IP connections
and returns either the user name or other information about the
process that owns the connection.
Install oidentd if you need to look up information about specific
TCP/IP connections.
%prep
%setup
%patch0 -p1
%build
%configure \
--enable-masq \
--enable-ipv6 \
--disable-debug \
--disable-warn \
CFLAGS="${RPM_OPT_FLAGS} -std=gnu89"
%{__make} %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
%makeinstall
%{__install} -Dp -m 755 %{SOURCE1} %{buildroot}/etc/rc.d/init.d/identd
%{__install} -Dp -m 640 %{SOURCE2} %{buildroot}%{_sysconfdir}/identd.spoof
%{__install} -Dp -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/oidentd.users
%clean
%{__rm} -rf %{buildroot}
%post
/sbin/chkconfig --add identd
%preun
if [ $1 -eq 0 ]; then
/sbin/service identd stop >/dev/null 2>&1
/sbin/chkconfig --del identd
fi
%postun
if [ $1 -ge 1 ]; then
/sbin/service identd condrestart >/dev/null 2>&1
fi
%files
%defattr(-, root, root, 0755)
%doc AUTHORS ChangeLog* COPYING* doc/rfc1413 NEWS README TODO
%attr(0640, root, nobody) %config(noreplace) %{_sysconfdir}/identd.spoof
%attr(0640, root, nobody) %config(noreplace) %{_sysconfdir}/oidentd.users
%config /etc/rc.d/init.d/identd
%{_sbindir}/oidentd
%{_mandir}/man?/*
%changelog
* Fri Jul 14 2023 BogusDateBot
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
by assuming the date is correct and changing the weekday.
* Tue Mar 29 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.0.8-4.sme
- fix missing masquerade [SME: 9404]
- fedora patch https://bugzilla.redhat.com/show_bug.cgi?id=1305491
* Fri Mar 18 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.08-2.sme
- Import for SME 10 [SME: 9340]
* Mon Apr 16 2007 Dries Verachtert <dries@ulyssis.org> - 2.0.8-1 - 7981/dag
- Updated to release 2.0.8.
* Wed Nov 3 2004 Matthias Saou <http://freshrpms.net/> 2.0.7-4
- Rebuild for Fedora Core 3.
- Change /etc/init.d to /etc/rc.d/init.d and minor other spec tweaks.
* Wed May 19 2004 Matthias Saou <http://freshrpms.net/> 2.0.7-3
- Rebuild for Fedora Core 2.
* Fri Nov 7 2003 Matthias Saou <http://freshrpms.net/> 2.0.7-2
- Rebuild for Fedora Core 1.
* Tue Jul 15 2003 Matthias Saou <http://freshrpms.net/>
- Update to 2.0.7.
* Mon Mar 31 2003 Matthias Saou <http://freshrpms.net/>
- Rebuilt for Red Hat Linux 9.
* Sun Sep 29 2002 Matthias Saou <http://freshrpms.net/>
- Rebuilt for Red Hat Linux 8.0.
* Thu Aug 22 2002 Matthias Saou <http://freshrpms.net/>
- Fixed the init script's status, thanks to Jørn for spotting this.
* Wed Aug 21 2002 Matthias Saou <http://freshrpms.net/>
- Update to 2.0.4.
* Fri May 3 2002 Matthias Saou <http://freshrpms.net/>
- Rebuilt against Red Hat Linux 7.3.
- Added the %%{?_smp_mflags} expansion.
* Tue Jan 8 2002 Matthias Saou <http://freshrpms.net/>
- Update to 2.0.3.
- Fix user in %files for "-".
* Sun Dec 30 2001 Matthias Saou <http://freshrpms.net/>
- Update to 2.0.2.
* Thu Oct 4 2001 Matthias Saou <http://freshrpms.net/>
- Update to 2.0.1.
* Mon Oct 1 2001 Matthias Saou <http://freshrpms.net/>
- Update to 2.0.0.
* Sat Sep 15 2001 Matthias Saou <http://freshrpms.net/>
- Update to 1.9.9.1.
* Mon Aug 27 2001 Matthias Saou <http://freshrpms.net/>
- Update to 1.9.9 (complete program rewrite).
- Added new docs and manpages.
* Tue Apr 24 2001 Matthias Saou <http://freshrpms.net/>
- Spec file cleanup and rebuilt for Red Hat 7.1.
* Tue Jan 2 2001 Matthias Saou <http://freshrpms.net/>
- Added a Conflicts: for pidentd
- Quick cleanup
- Fixed o-r modes
- Changed the uid/gid in the initscript
* Wed Dec 27 2000 Matthias Saou <http://freshrpms.net/>
- Initial RPM release

9
oidentd.users Normal file
View File

@ -0,0 +1,9 @@
# Don't forget to use the -m flag!
192.168.1.1 someone UNIX
192.168.1.2 noone WINDOWS
192.168.1.1/32 user1 UNIX
192.168.1.0/24 user3 UNIX
192.168.0.0/16 user4 UNIX
somehost user5 UNIX
10.0.0.0/8 user6 UNIX
192.168.1.0/255.255.255.0 user7 UNIX