Skip to content

Commit 8d1ae6f

Browse files
besser82solardiz
authored andcommitted
pam_tcb: Apply proper soname during linking if PAM_SO_SUFFIX is set.
Adapt clean target also. Signed-off-by: Björn Esser <[email protected]>
1 parent 6b4fdb4 commit 8d1ae6f

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
modules.
3535
* pam_tcb/Makefile: Honor PAM_SO_SUFFIX variable.
3636

37+
pam_tcb: Apply proper soname during linking if PAM_SO_SUFFIX
38+
is set.
39+
* pam_tcb/Makefile: Apply proper soname with PAM_SO_SUFFIX
40+
not being empty. Adapt clean target also.
41+
3742
2021-09-25 Dmitry V. Levin <ldv at owl.openwall.com>
3843

3944
Add github CI.

pam_tcb/Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ PAM_SO_SUFFIX =
44
PAM_TCB = pam_tcb.so$(PAM_SO_SUFFIX)
55
PAM_MAP = pam_tcb.map
66

7+
ifneq ($(PAM_SO_SUFFIX),)
8+
PAM_TCB_SONAME = -Wl,-soname,$(PAM_TCB)
9+
endif
10+
711
LIBSRC = \
812
pam_unix_auth.c pam_unix_acct.c pam_unix_sess.c pam_unix_passwd.c \
913
support.c compat.c
@@ -13,8 +17,8 @@ LIBOBJ = $(LIBSRC:.c=.o)
1317
all: $(PAM_TCB)
1418

1519
$(PAM_TCB): $(LIBOBJ) $(PAM_MAP)
16-
$(CC) $(LDFLAGS) -shared -o $@ -Wl,--version-script=$(PAM_MAP) \
17-
$(LIBOBJ) -lcrypt -lpam -ltcb
20+
$(CC) $(LDFLAGS) -shared -o $@ $(PAM_TCB_SONAME) \
21+
-Wl,--version-script=$(PAM_MAP) $(LIBOBJ) -lcrypt -lpam -ltcb
1822

1923
.c.o:
2024
$(CC) $(CFLAGS) -fPIC -c $< -o $@
@@ -44,4 +48,4 @@ install-pam_pwdb: install
4448
$(INSTALL) -m 644 pam_pwdb.8 $(DESTDIR)$(MANDIR)/man8/
4549

4650
clean:
47-
rm -f *.o *~ $(PAM_TCB)
51+
rm -f *.o *~ $(PAM_TCB)*

0 commit comments

Comments
 (0)