Skip to content

Commit 560307b

Browse files
committed
Rename "secure-bits" service property to "securebits"
The relevant documentation calls it "securebits" so let's stick with that pre-established term/spelling.
1 parent 79f3561 commit 560307b

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

doc/manpages/dinit-service.5.m4

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -595,16 +595,16 @@ For example, to allow a process to bind to privileged TCP/IP ports, use \fB^CAP_
595595
.IP
596596
This setting is only available if \fBdinit\fR was built with capabilities support.
597597
.TP
598-
\fBsecure\-bits\fR = \fIsecurebits\fR
598+
\fBsecurebits\fR = \fIsecurebits-flags\fR
599599
.TQ
600-
\fBsecure\-bits\fR += \fIsecurebits-addendum\fR
600+
\fBsecure\-bits\fR += \fIsecurebits-flags-addendum\fR
601601
This is a companion option to \fBcapabilities\fR, specifying the `securebits' flags
602602
(see \fBcapabilities\fR(7)) for the service process(es).
603-
It is specified as a list of flags separated by white space.
603+
It is specified as a list of flag names separated by white space.
604604
The allowed flags are \fBkeep\-caps\fR,
605605
\fBno\-setuid\-fixup\fR, \fBnoroot\fR, and each of these with \fB\-locked\fR appended.
606-
The `+=' operator used with this setting can be used to add additional securebits on top of those
607-
specified previously.
606+
The `+=' operator used with this setting can be used to add additional securebits flags on top of
607+
those specified previously.
608608
.IP
609609
This setting is only available if \fBdinit\fR was built with capabilities support.
610610
.TP

src/includes/load-service.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ enum class setting_id_t {
269269
#endif
270270
#if SUPPORT_CAPABILITIES
271271
CAPABILITIES,
272-
SECURE_BITS,
272+
SECUREBITS,
273273
#endif
274274
#if SUPPORT_IOPRIO
275275
IOPRIO,
@@ -1521,7 +1521,7 @@ class service_settings_wrapper
15211521
report_lint("'capabilities' specified, but ignored for the specified (or default) service type.");
15221522
}
15231523
if (secbits.get()) {
1524-
report_lint("'secure-bits' specified, but ignored for the specified (or default) service type.");
1524+
report_lint("'securebits' specified, but ignored for the specified (or default) service type.");
15251525
}
15261526
#endif
15271527
if (run_as_uid != (uid_t)-1) {
@@ -1746,7 +1746,7 @@ void process_service_line(settings_wrapper &settings, ::string_view name, const
17461746
settings.capabilities = std::move(cap_iab);
17471747
break;
17481748
}
1749-
case setting_id_t::SECURE_BITS:
1749+
case setting_id_t::SECUREBITS:
17501750
{
17511751
std::list<std::pair<unsigned,unsigned>> indices;
17521752
string onstart_cmds = read_setting_value(input_pos, i, end, &indices);
@@ -1777,7 +1777,7 @@ void process_service_line(settings_wrapper &settings, ::string_view name, const
17771777
}
17781778
else {
17791779
throw service_description_exc(name, "unknown securebits flag: " + secbit_txt,
1780-
"secure-bits", input_pos);
1780+
"securebits", input_pos);
17811781
}
17821782
}
17831783
break;

src/settings.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ setting_details all_settings[] = {
6565

6666
#if SUPPORT_CAPABILITIES
6767
{"capabilities", setting_id_t::CAPABILITIES, false, true, true},
68-
{"secure-bits", setting_id_t::SECURE_BITS, false, true, true},
68+
{"securebits", setting_id_t::SECUREBITS, false, true, true},
6969
#endif
7070

7171
#if SUPPORT_IOPRIO

0 commit comments

Comments
 (0)