Мне нужно пересобрать openssh, чтобы включить ведение журнала аудита.
Итак (как root):
apt-get openssh
apt-get build-dep openssh
dpkg-source -x openssh_6.6p1-2ubuntu2.3.dsc
отредактируйте debian/rules, добавьте:
confflags += --with-audit=linux
после
confflags += --with-ssl-engine
./configure
make
dpkg-buildpackage -b
......
gcc -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset -fstack-protector-all -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT -DSSH_EXTRAVERSION=\"Ubuntu-2ubuntu2.3ubuntu1audit\" -I. -I.. -I/usr/include/editline -I/usr/include/ConsoleKit/ck-connector -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -DSSHDIR=\"/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/usr/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/bin/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/lib/openssh/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/lib/openssh/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/usr/lib/openssh/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/run/sshd\" -DHAVE_CONFIG_H -c ../sshd.c
In file included from ../openbsd-compat/sys-tree.h:29:0,
from ../sshd.c:56:
./config.h:1606:0: warning: "SUPERUSER_PATH" redefined [enabled by default]
#define SUPERUSER_PATH "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
^
In file included from ../includes.h:171:0,
from ../sshd.c:45:
../defines.h:399:0: note: this is the location of the previous definition
# define SUPERUSER_PATH _PATH_STDPATH
^
In file included from ../openbsd-compat/sys-tree.h:29:0,
from ../sshd.c:56:
./config.h:1615:0: warning: "USER_PATH" redefined [enabled by default]
#define USER_PATH "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
^
In file included from ../includes.h:19:0,
from ../sshd.c:45:
../config.h:1615:0: note: this is the location of the previous definition
#define USER_PATH "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
^
In file included from ../openbsd-compat/openbsd-compat.h:157:0,
from ../includes.h:174,
from ../sshd.c:45:
**../openbsd-compat/bsd-misc.h:122:39: error: expected identifier or ‘(’ before ‘while’**
# define krb5_free_error_message(a,b) while(0)
Кто-нибудь знает решение, чтобы решить эту проблему?
Я попытался поместить часть while(0)
в ()
или {}
, но это не помогло.
У меня не было этой проблемы с 14.04.0.
Любые советы / советы будут с благодарностью.
Спасибо!