Skip to content

Commit 5a2489e

Browse files
topimiettinenpcmoore
authored andcommitted
all: add links to the reference policy repo
Use links to https://github.com/SELinuxProject/refpolicy where useful. Signed-off-by: Topi Miettinen <[email protected]> [PM: tweaked subject line] Signed-off-by: Paul Moore <[email protected]>
1 parent 51a1d12 commit 5a2489e

File tree

3 files changed

+70
-59
lines changed

3 files changed

+70
-59
lines changed

src/class_permission_statements.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ For those who write or manager SELinux policy, there is no need to
99
define new objects and their associated permissions as these would be
1010
done by those who actually design and/or write object managers.
1111

12-
A list of object classes used by the **Reference Policy** can be found
13-
in the *./policy/flask/security\_classes* file.
12+
A list of object classes used by the [**Reference
13+
Policy**](https://github.com/SELinuxProject/refpolicy) can be found in the
14+
[*./policy/flask/security\_classes*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/flask/security_classes)
15+
file.
1416

1517
There are two variants of the *class* statement for writing policy:
1618

@@ -72,8 +74,11 @@ Permissions can be defined within policy in two ways:
7274
declared for a specific object class only (i.e. the permission is
7375
not inherited by any other object class).
7476

75-
A list of classes and their permissions used by the **Reference Policy**
76-
can be found in the *./policy/flask/access_vectors* file.
77+
A list of classes and their permissions used by the [**Reference
78+
Policy**](https://github.com/SELinuxProject/refpolicy) can be found in
79+
the
80+
[*./policy/flask/access\_vectors*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/flask/access_vectors)
81+
file.
7782

7883
## *common*
7984

src/constraint_statements.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ Conditional Policy Statements
8080

8181
**Examples:**
8282

83-
These examples have been taken from the **Reference Policy** source
84-
*./policy/constraints* file.
83+
These examples have been taken from the [**Reference
84+
Policy**](https://github.com/SELinuxProject/refpolicy) source
85+
[*./policy/constraints*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/constraints)
86+
file.
8587

8688
```
8789
# This constrain statement is the "SELinux process identity
@@ -327,9 +329,11 @@ Conditional Policy Statements
327329

328330
**Example:**
329331

330-
This example has been taken from the **Reference Policy** source
331-
*./policy/mls* constraints file. These are built into the policy at build
332-
time and add constraints to many of the object classes.
332+
This example has been taken from the [**Reference
333+
Policy**](https://github.com/SELinuxProject/refpolicy) source
334+
[**./policy/mls*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/mls)
335+
constraints file. These are built into the policy at build time and
336+
add constraints to many of the object classes.
333337

334338
```
335339
# The MLS Reference Policy mlsconstrain statement for searching
@@ -439,8 +443,8 @@ Conditional Policy Statements
439443

440444
**Example:**
441445

442-
This example has been taken from the **Reference Policy** source
443-
*./policy/mls* file.
446+
This example has been taken from the [**Reference Policy**](https://github.com/SELinuxProject/refpolicy) source
447+
[*./policy/mls*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/mls) file.
444448

445449
```
446450
# The MLS Reference Policy mlsvalidatetrans statement for

src/reference_policy.md

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,13 @@
4848
- [*direct_sysadm_daemon*](#direct_sysadm_daemon)
4949
- [Module Expansion Process](#module-expansion-process)
5050

51-
The Reference Policy is now the standard policy source used to build
52-
Linux SELinux policies. This provides a single source tree with
53-
supporting documentation that can be used to build policies for
54-
different purposes such as: confining important daemons, supporting MLS
55-
/ MCS type policies and locking down systems so that all processes are
56-
under SELinux control.
51+
The [**Reference Policy**](https://github.com/SELinuxProject/refpolicy)
52+
is now the standard policy source used to build Linux SELinux
53+
policies. This provides a single source tree with supporting
54+
documentation that can be used to build policies for different
55+
purposes such as: confining important daemons, supporting MLS / MCS
56+
type policies and locking down systems so that all processes are under
57+
SELinux control.
5758

5859
This section details how the Reference Policy is:
5960

@@ -418,7 +419,8 @@ configured to allow a policy to be built.
418419
The **Reference Policy Files and Directories** list shows the major
419420
files and their directories with a description of each taken from the
420421
README file (with comments added). All directories are relative to the root of
421-
the Reference Policy source directory *./policy*.
422+
the [Reference Policy](https://github.com/SELinuxProject/refpolicy) source directory
423+
[*./policy*](https://github.com/SELinuxProject/refpolicy/tree/master/policy).
422424

423425
The *build.conf* and *modules.conf* configuration files are further detailed
424426
in the [**Source Configuration Files**](#source-configuration-files)
@@ -431,26 +433,26 @@ modular policy is being built. This file is explained in the
431433

432434
**Reference Policy Files and Directories:**
433435

434-
*Makefile*
436+
[*Makefile*](https://github.com/SELinuxProject/refpolicy/tree/master/Makefile)
435437

436438
- General rules for building the policy.
437439

438-
*Rules.modular*
440+
[*Rules.modular*](https://github.com/SELinuxProject/refpolicy/tree/master/Rules.modular)
439441

440442
- Makefile rules specific to building loadable module policies.
441443

442-
*Rules.monolithic*
444+
[*Rules.monolithic*](https://github.com/SELinuxProject/refpolicy/tree/master/Rules.monolithic)
443445

444446
- Makefile rules specific to building monolithic policies.
445447

446-
*build.conf*
448+
[*build.conf*](https://github.com/SELinuxProject/refpolicy/tree/master/build.conf)
447449

448450
- Options which influence the building of the policy, such as the policy type
449451
and distribution. This file is described in the
450452
[**Reference Policy Build Options - build.conf**](#reference-policy-build-options---build.conf)
451453
section.
452454

453-
*config/appconfig-\<type\>*
455+
[*config*](https://github.com/SELinuxProject/refpolicy/tree/master/config)*/appconfig-\<type\>*
454456

455457
- Application configuration files for all configurations of the Reference
456458
Policy where *\<type\>* is taken from the *build.conf* **TYPE** entry that
@@ -459,64 +461,64 @@ modular policy is being built. This file is explained in the
459461
[**SELinux Configuration Files**](policy_config_files.md#policy-configuration-files)
460462
section.
461463

462-
*config/file_contexts.subs_dist*
464+
[*config/file_contexts.subs_dist*](https://github.com/SELinuxProject/refpolicy/tree/master/config/file_contexts.subs_dist)
463465

464466
- Used to configure file context aliases (see the
465467
[**contexts/files/file_contexts.subs and file_contexts.subs_dist File**](policy_config_files.md#contextsfilesfile_contexts.subs)
466468
section).
467469

468-
*config/local.users*
470+
[*config/local.users*](https://github.com/SELinuxProject/refpolicy/tree/master/config/local.users)
469471

470472
- The file read by load policy for adding SELinux users to the policy on
471473
the fly. Note that this file is not used in the modular policy build.
472474

473-
*doc/html/\**
475+
[*doc/html*](https://github.com/SELinuxProject/refpolicy/tree/master/doc/html)*/\**
474476

475477
- When *make html* has been executed, contains the in-policy XML
476478
documentation, presented in web page form.
477479

478-
*doc/policy.dtd*
480+
[*doc/policy.dtd*](https://github.com/SELinuxProject/refpolicy/tree/master/doc/policy.dtd)
479481

480482
- The *doc/policy.xml* file is validated against this DTD.
481483

482-
*doc/policy.xml*
484+
[*doc/policy.xml*](https://github.com/SELinuxProject/refpolicy/tree/master/doc/policy.xml)
483485

484486
- This file is generated/updated by the conf and html make targets.
485487
It contains the complete XML documentation included in the policy.
486488

487-
*doc/templates/\**
489+
[*doc/templates*](https://github.com/SELinuxProject/refpolicy/tree/master/doc/templates)*/\**
488490

489491
- Templates used for documentation web pages.
490492

491-
*man/\**
493+
[*man*](https://github.com/SELinuxProject/refpolicy/tree/master/man)*/\**
492494

493495
- Various man pages for modules (ftp, http etc.)
494496

495-
*support/\**
497+
[*support*](https://github.com/SELinuxProject/refpolicy/tree/master/support)*/\**
496498

497499
- Tools used in the build process.
498500

499-
*policy/flask/initial_sids*
501+
[*policy/flask/initial_sids*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/flask/initial_sids)
500502

501503
- This file has declarations for each initial SID. The file usage in policy
502504
generation is described in the
503505
[**Modular Policy Build Structure**](#modular-policy-build-structure)
504506
section.
505507

506-
*policy/flask/security_classes*
508+
[*policy/flask/security_classes*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/flask/security_classes)
507509

508510
- This file has declarations for each security class. The file usage in
509511
policy generation is described in the
510512
[**Modular Policy Build Structure**](#modular-policy-build-structure)
511513
section.
512514

513-
*policy/flask/access_vectors*
515+
[*policy/flask/access_vectors*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/flask/access_vectors)
514516

515517
- This file defines the common permissions and class specific permissions
516518
and is described in the [**Modular Policy Build Structure**](#modular-policy-build-structure)
517519
section.
518520

519-
*policy/modules/\**
521+
[*policy/modules*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/modules)*/\**
520522

521523
- Each directory represents a layer in Reference Policy. All of the modules
522524
are contained in one of these layers. The *contrib* modules are supplied
@@ -528,13 +530,13 @@ modular policy is being built. This file is explained in the
528530
[**Modular Policy Build Structure**](#modular-policy-build-structure)
529531
section.
530532

531-
*policy/support/\**
533+
[*policy/support*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/support)*/\**
532534

533535
- Reference Policy support macros are described in the
534536
[**Reference Policy support Macros**](#reference-policy-support-macros)
535537
section.
536538

537-
*policy/booleans.conf*
539+
[*policy/booleans.conf*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/booleans.conf)
538540

539541
- This file is generated/updated by *make conf*. It contains the booleans in
540542
the policy and their default values. If tunables are implemented as
@@ -544,7 +546,7 @@ modular policy is being built. This file is explained in the
544546
[**Booleans, Global Booleans and Tunable Booleans**](#booleans-global-booleans-and-tunable-booleans)
545547
section).
546548

547-
*policy/constraints*
549+
[*policy/constraints*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/constraints)
548550

549551
- This file defines constraints on permissions in the form of boolean
550552
expressions that must be satisfied in order for specified permissions to
@@ -556,33 +558,33 @@ modular policy is being built. This file is explained in the
556558
generation is described in the
557559
[**Modular Policy Build Structure**](#modular-policy-build-structure) section.
558560

559-
*policy/context_defaults*
561+
[*policy/context_defaults*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/context_defaults)
560562

561563
- This would contain any specific *default_user*, *default_role*,
562564
*default_type* and/or *default_range* rules required by the policy.
563565

564-
*policy/global_booleans*
566+
[*policy/global_booleans*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/global_booleans)
565567

566568
- This file defines all booleans that have a global scope, their default
567569
value, and documentation. See the
568570
[**Booleans, Global Booleans and Tunable Booleans**](#booleans-global-booleans-and-tunable-booleans)
569571
section.
570572

571-
*policy/global_tunables*
573+
[*policy/global_tunables*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/global_tunables)
572574

573575
- This file defines all tunables that have a global scope, their default
574576
value, and documentation.
575577
See the [**Booleans, Global Booleans and Tunable Booleans**](#booleans-global-booleans-and-tunable-booleans)
576578
section.
577579

578-
*policy/mcs*
580+
[*policy/mcs*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/mcs)
579581

580582
- This contains information used to generate the *sensitivity*, *category*,
581583
*level* and *mlsconstraint* statements used to define the MCS configuration.
582584
The file usage in policy generation is described in the
583585
[**Modular Policy Build Structure**](#modular-policy-build-structure) section.
584586

585-
*policy/mls*
587+
[*policy/mls*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/mls)
586588

587589
- This contains information used to generate the *sensitivity*, *category*,
588590
*level* and *mlsconstraint* statements used to define the MLS configuration.
@@ -600,13 +602,13 @@ modular policy is being built. This file is explained in the
600602
[**Reference Policy Build Options - policy/modules.conf**](#reference-policy-build-options---policymodules.conf)
601603
section.
602604

603-
*policy/policy_capabilities*
605+
[*policy/policy_capabilities*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/policy_capabilities)
604606

605607
- This file defines the policy capabilities that can be enabled in the policy.
606608
The file usage in policy generation is described in the
607609
[**Modular Policy Build Structure**](#modular-policy-build-structure) section.
608610

609-
*policy/users*
611+
[*policy/users*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/users)
610612

611613
- This file defines the users included in the policy. The file usage in policy
612614
generation is described in the
@@ -619,10 +621,10 @@ modular policy is being built. This file is explained in the
619621

620622
### Source Configuration Files
621623

622-
There are two major configuration files (*build.conf* and *modules.conf*)
624+
There are two major configuration files ([*build.conf*](https://github.com/SELinuxProject/refpolicy/tree/master/build.conf) and *modules.conf*)
623625
that define the policy to be built and are detailed in this section.
624626

625-
#### Reference Policy Build Options - build.conf
627+
#### Reference Policy Build Options - [build.conf](https://github.com/SELinuxProject/refpolicy/tree/master/build.conf)
626628

627629
This file defines the policy type to be built that will influence its
628630
name and where the source will be located once it is finally installed.
@@ -636,7 +638,7 @@ process to set *m4* macro parameters. These macro definitions are also used
636638
within the module source files to control how the policy is built with examples
637639
shown in the [***ifdef***](#ifdef-ifndef-parameters) section.
638640

639-
***build.conf* Entries:**
641+
**[*build.conf*](https://github.com/SELinuxProject/refpolicy/tree/master/build.conf) Entries:**
640642

641643
*TYPE*
642644

@@ -1685,30 +1687,30 @@ semodule -i ipsec_test_policy.pp
16851687
This section explains some of the support macros used to build reference
16861688
policy source modules. These macros are located at:
16871689

1688-
- *./policy/support* for the reference policy source.
1690+
- [*./policy/support*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/support) for the reference policy source.
16891691
- */usr/share/selinux/\<NAME\>/include/support* for Reference
16901692
Policy installed header files.
16911693
- */usr/share/selinux/devel/support* for Fedora installed header files.
16921694

16931695
The following support macro file contents are explained:
16941696

1695-
- *loadable_module.spt* - Loadable module support.
1696-
- *misc_macros.spt* - Generate users, bools and security contexts.
1697-
- *mls_mcs_macros.spt* - MLS / MCS support.
1698-
- *file_patterns.spt* - Sets up allow rules via parameters for files and
1697+
- [*loadable_module.spt*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/support/loadable_module.spt) - Loadable module support.
1698+
- [*misc_macros.spt*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/support/misc_macros.spt) - Generate users, bools and security contexts.
1699+
- [*mls_mcs_macros.spt*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/support/mls_mcs_macros.spt) - MLS / MCS support.
1700+
- [*file_patterns.spt*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/support/file_patterns.spt) - Sets up allow rules via parameters for files and
16991701
directories.
1700-
- *ipc_patterns.spt* - Sets up allow rules via parameters for Unix domain
1702+
- [*ipc_patterns.spt*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/support/ipc_patterns.spt) - Sets up allow rules via parameters for Unix domain
17011703
sockets.
1702-
- *misc_patterns.spt* - Domain and process transitions.
1703-
- *obj_perm_sets.spt* - Object classes and permissions.
1704+
- [*misc_patterns.spt*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/support/misc_patterns.spt) - Domain and process transitions.
1705+
- [*obj_perm_sets.spt*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/support/obj_perm_sets.spt) - Object classes and permissions.
17041706

17051707
When the header files are installed the *all_perms.spt* support macro
17061708
file is also installed that describes all classes and permissions
17071709
configured in the original source policy.
17081710

17091711
**Support Macros described in this section:**
17101712

1711-
*loadable_module.spt*
1713+
[*loadable_module.spt*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/support/loadable_module.spt)
17121714

17131715
- [*policy_module* Macro](#policy_module-macro)
17141716
- For adding the *module* statement and mandatory *require* block entries.
@@ -1731,7 +1733,7 @@ configured in the original source policy.
17311733
- [*template* Macro](#template-macro)
17321734
- Generate *template* interface block.
17331735

1734-
*misc_macros.spt*
1736+
[*misc_macros.spt*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/support/misc_macros.spt)
17351737

17361738
- [*gen_context* Macro](#gen_context-macro)
17371739
- Generate a security context.
@@ -1742,7 +1744,7 @@ configured in the original source policy.
17421744
- [*gen_bool* Macro](#gen_bool-macro)
17431745
- Generate a boolean.
17441746

1745-
*mls_mcs_macros.spt*
1747+
[*mls_mcs_macros.spt*](https://github.com/SELinuxProject/refpolicy/tree/master/policy/support/mls_mcs_macros.spt)
17461748

17471749
- [*gen_cats* Macro](#gen_cats-macro)
17481750
- Declares categories c0 to c(N-1).

0 commit comments

Comments
 (0)