Browse code

small fixes

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@280 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/02/14 06:36:32
Showing 4 changed files
... ...
@@ -1,4 +1,11 @@
1
-Fri Feb 13 14:28:05 GMT 2004 (njh
1
+Fri Feb 13 22:35:55 CET 2004 (tk)
2
+---------------------------------
3
+  * Makefile: don't use non standard id flags (thanks to Andy Fiddaman
4
+	      <clam*fiddaman.net>)
5
+  * clamscan: manager.c - include clamav-config.h, it fixes a problem with
6
+	      hardcoded clamav user (thanks to Reinhard Max <max*suse.de>)
7
+
8
+Fri Feb 13 14:28:05 GMT 2004 (njh)
2 9
 ----------------------------------
3 10
   * libclamav: Added a new bounce delimeter
4 11
 
... ...
@@ -9,12 +16,12 @@ Thu Feb 12 18:47:44 GMT 2004 (njh)
9 9
 Wed Feb 11 18:00:13 CET 2004 (tk)
10 10
 ---------------------------------
11 11
   * libclamav: enabled autodetection of Eserv/2 mail files (thanks to
12
-	       Andrey Cherezov <andrey@cherezov.koenig.su>)
12
+	       Andrey Cherezov <andrey*cherezov.koenig.su>)
13 13
 
14 14
 Wed Feb 11 08:19:54 GMT 2004 (njh)
15 15
 ----------------------------------
16 16
   * libclamav: Use O_BINARY when saving attachments which is required for
17
-	Cygwin. Thanks to "Andrey Cherezov" <andrey@cherezov.koenig.su>
17
+	Cygwin. Thanks to "Andrey Cherezov" <andrey*cherezov.koenig.su>
18 18
 
19 19
 Wed Feb 11 00:08:26 CET 2004 (tk)
20 20
 ---------------------------------
... ...
@@ -19,6 +19,10 @@
19 19
  *  Wed Mar  5 03:45:31 CET 2003: included --move code from Damien Curtain
20 20
  */
21 21
 
22
+#if HAVE_CONFIG_H
23
+#include "clamav-config.h"
24
+#endif
25
+
22 26
 #include <stdio.h>
23 27
 #include <stdlib.h>
24 28
 #include <string.h>
... ...
@@ -28,7 +28,7 @@ install:
28 28
 	@test -f $(DESTDIR)$(DBINST)/daily.cvd || $(INSTALL_DATA) daily.cvd $(DESTDIR)$(DBINST)
29 29
 	@test -f $(DESTDIR)$(DBINST)/viruses.db && rm -f $(DESTDIR)$(DBINST)/viruses.db || true
30 30
 	@test -f $(DESTDIR)$(DBINST)/viruses.db2 && rm -f $(DESTDIR)$(DBINST)/viruses.db2 || true
31
-	@if test `id -u` -eq 0 && test -n "${CLAMAVUSER}" && test -n "${CLAMAVGROUP}"; then \
31
+	@if test `id|sed -e 's/^.[^(]*(\([^)]*\)).*/\1/'` = "root" && test -n "${CLAMAVUSER}" && test -n "${CLAMAVGROUP}"; then \
32 32
 	    chmod 775 $(DESTDIR)$(DBINST); \
33 33
 	    chown ${CLAMAVUSER} $(DESTDIR)$(DBINST); \
34 34
 	    chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST); \
... ...
@@ -252,7 +252,7 @@ install:
252 252
 	@test -f $(DESTDIR)$(DBINST)/daily.cvd || $(INSTALL_DATA) daily.cvd $(DESTDIR)$(DBINST)
253 253
 	@test -f $(DESTDIR)$(DBINST)/viruses.db && rm -f $(DESTDIR)$(DBINST)/viruses.db || true
254 254
 	@test -f $(DESTDIR)$(DBINST)/viruses.db2 && rm -f $(DESTDIR)$(DBINST)/viruses.db2 || true
255
-	@if test `id -u` -eq 0 && test -n "${CLAMAVUSER}" && test -n "${CLAMAVGROUP}"; then \
255
+	@if test `id|sed -e 's/^.[^(]*(\([^)]*\)).*/\1/'` = "root" && test -n "${CLAMAVUSER}" && test -n "${CLAMAVGROUP}"; then \
256 256
 	    chmod 775 $(DESTDIR)$(DBINST); \
257 257
 	    chown ${CLAMAVUSER} $(DESTDIR)$(DBINST); \
258 258
 	    chgrp ${CLAMAVGROUP} $(DESTDIR)$(DBINST); \