Skip to content

Commit 16a24b2

Browse files
authored
Merge pull request #5724 from btriller/CFE-3371
CFE-3371: Add feature class for libpam
2 parents af9aff4 + e68a173 commit 16a24b2

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

libpromises/feature.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#include <buffer.h>
66

77
static const char* features[] = {
8+
#ifdef HAVE_LIBPAM
9+
"pam",
10+
#endif
811
#ifdef HAVE_LIBYAML
912
"yaml",
1013
#endif
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
######################################################
2+
#
3+
# Test that @if feature() and class guard works for pam
4+
#
5+
#####################################################
6+
7+
body common control
8+
{
9+
inputs => { "../../default.cf.sub" };
10+
bundlesequence => { default("$(this.promise_filename)") };
11+
version => "1.0";
12+
}
13+
14+
bundle common test
15+
{
16+
meta:
17+
"description" -> { "CFE-3371" }
18+
string => "Test that @if feature() and class guard works for pam";
19+
}
20+
21+
bundle agent check
22+
{
23+
reports:
24+
@if feature(pam)
25+
feature_pam::
26+
"$(this.promise_filename) Pass";
27+
!feature_pam::
28+
"$(this.promise_filename) FAIL";
29+
@else
30+
!feature_pam::
31+
"$(this.promise_filename) Pass";
32+
feature_pam::
33+
"$(this.promise_filename) FAIL";
34+
@endif
35+
}

0 commit comments

Comments
 (0)