Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
aports
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
657
Issues
657
List
Boards
Labels
Service Desk
Milestones
Merge Requests
222
Merge Requests
222
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
aports
Commits
6c7a24f5
Commit
6c7a24f5
authored
Sep 29, 2009
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main/gross: upgrade to 1.0.2
parent
d0ae7df4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
103 deletions
+4
-103
main/gross/APKBUILD
main/gross/APKBUILD
+4
-11
main/gross/gross-1.0.1-configure.ac.patch
main/gross/gross-1.0.1-configure.ac.patch
+0
-20
main/gross/gross-1.0.1-user.patch
main/gross/gross-1.0.1-user.patch
+0
-72
No files found.
main/gross/APKBUILD
View file @
6c7a24f5
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname
=
gross
pkgver
=
1.0.
1
pkgrel
=
5
pkgver
=
1.0.
2
pkgrel
=
0
pkgdesc
=
"Greylisting of suspicious sources"
url
=
"http://code.google.com/p/gross/"
license
=
"BSD"
...
...
@@ -14,9 +14,7 @@ subpackages="$pkgname-doc $pkgname-dev"
source
=
"http://gross.googlecode.com/files/
$pkgname
-
$pkgver
.tar.gz
grossd.initd
grossd.confd
gross-1.0.1-configure.ac.patch
gross-1.0.1-default-conf.patch
gross-1.0.1-user.patch
"
build
()
{
...
...
@@ -26,9 +24,6 @@ build() {
msg
"Applying
$_i
..."
patch
-p1
<
$_i
||
return
1
done
msg
"Running autotools..."
aclocal
--force
&&
autoconf
&&
automake
--add-missing
\
&&
libtoolize
--force
--copy
||
return
1
export
lt_SED
=
'/bin/sed'
export
lt_cv_path_SED
=
'/bin/sed'
...
...
@@ -45,9 +40,7 @@ build() {
install
-m644
-D
"
$srcdir
"
/grossd.confd
"
$pkgdir
"
/etc/conf.d/grossd
}
md5sums
=
"
f8f81b36850dcda30cb81799b9cee3b6 gross-1.0.1
.tar.gz
md5sums
=
"
cb88d88553161c01e9bed7a74c3e9263 gross-1.0.2
.tar.gz
6e8a2626c0c9f0e98e950a67a55a7040 grossd.initd
5ca1c6e51c3243236e6564480b20279b grossd.confd
bb75b119ac96b8f99831ce6df810003f gross-1.0.1-configure.ac.patch
7c504b653c71dcf7b192bc487b3516fd gross-1.0.1-default-conf.patch
16e184d59d520db565388f010cc75e83 gross-1.0.1-user.patch"
7c504b653c71dcf7b192bc487b3516fd gross-1.0.1-default-conf.patch"
main/gross/gross-1.0.1-configure.ac.patch
deleted
100644 → 0
View file @
d0ae7df4
--- a/configure.ac.orig 2008-05-29 16:18:56 +0000
+++ b/configure.ac 2008-05-30 09:10:48 +0000
@@ -52,7 +52,7 @@
then
AC_DEFINE([USE_SEM_OPEN], [], [Use sem_open() instead of sem_init()])
else
- AC_SEARCH_LIBS(sem_init, [rt], ,
+ AC_SEARCH_LIBS(sem_init, [rt pthread], ,
AC_MSG_ERROR([Can't compile without semaphores.])
)
fi
@@ -101,7 +101,7 @@
AC_MSG_CHECKING([whether to disable dnsbl checking])
AC_ARG_ENABLE(dnsbl,
AC_HELP_STRING([--disable-dnsbl], [Disable dnsbl checking]),
- [AC_MSG_RESULT([yes]) ; dnsbl="no"],
+ [AC_MSG_RESULT([yes]) ; dnsbl="$enableval"],
[AC_MSG_RESULT([no]) ; dnsbl="yes"]
)
main/gross/gross-1.0.1-user.patch
deleted
100644 → 0
View file @
d0ae7df4
Index: src/gross.c
===================================================================
--- a/src/gross.c (revision 491)
+++ b/src/gross.c (working copy)
@@ -553,7 +553,7 @@
void
usage(void)
{
- printf("Usage: grossd [-CDdhnPprV] [-f configfile]\n");
+ printf("Usage: grossd [-CDdhnPpruV] [-f configfile]\n");
printf(" -C create statefile and exit\n");
printf(" -D Enable debug logging (insane verbosity with -DD)\n");
printf(" -d Run grossd as a foreground process\n");
@@ -563,6 +563,7 @@
printf(" -p file write the process id in a pidfile\n");
printf(" -P file same as -p, but pid file must not exist\n");
printf(" -r disable replication\n");
+ printf(" -u user run gross as user\n");
printf(" -V version information\n");
exit(EXIT_USAGE);
}
@@ -612,6 +613,7 @@
pool_limits_t limits;
sigset_t mask, oldmask;
struct passwd *pwd;
+ char *user = "nobody";
#ifdef DNSBL
dns_check_info_t *dns_check_info;
@@ -623,7 +625,7 @@
daemon_shutdown(EXIT_FATAL, "Couldn't initialize context");
/* command line arguments */
- while ((c = getopt(argc, argv, ":drf:VCDnp:P:")) != -1) {
+ while ((c = getopt(argc, argv, ":drf:VCDnp:P:u:")) != -1) {
switch (c) {
case 'd':
ctx->config.flags |= FLG_NODAEMON;
@@ -663,6 +665,9 @@
ctx->config.flags |= FLG_CHECK_PIDFILE;
ctx->config.flags |= FLG_CREATE_PIDFILE;
break;
+ case 'u':
+ user = optarg;
+ break;
case 'h':
usage();
break;
@@ -675,16 +680,16 @@
/* grossd doesn't need to be running as root */
if (geteuid() == 0) {
- logstr(GLOG_DEBUG, "Running as root: setuid() to 'nobody'");
- pwd = getpwnam("nobody");
+ logstr(GLOG_DEBUG, "Running as root: setuid() to '%s'", user);
+ pwd = getpwnam(user);
if (NULL == pwd)
- daemon_shutdown(EXIT_FATAL, "Running as root: can't find user 'nobody'");
+ daemon_shutdown(EXIT_FATAL, "Running as root: can't find user '%s'", user);
if (setgid(pwd->pw_gid) != 0)
- daemon_shutdown(EXIT_FATAL, "Running as root: can't setgid(%d) to 'nobody': %s",
- pwd->pw_gid, strerror(errno));
+ daemon_shutdown(EXIT_FATAL, "Running as root: can't setgid(%d) to '%s': %s",
+ pwd->pw_gid, user, strerror(errno));
if (setuid(pwd->pw_uid) != 0)
- daemon_shutdown(EXIT_FATAL, "Running as root: can't setuid(%d) to 'nobody': %s",
- pwd->pw_uid, strerror(errno));
+ daemon_shutdown(EXIT_FATAL, "Running as root: can't setuid(%d) to '%s': %s",
+ pwd->pw_uid, user, strerror(errno));
}
config = default_config();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment