]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Turn on bos restricted code
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Thu, 24 Dec 2009 13:00:53 +0000 (13:00 +0000)
committerDerrick Brashear <shadow|account-1000005@unknown>
Thu, 31 Dec 2009 12:54:52 +0000 (04:54 -0800)
Remove the #ifdef's around the bos restricted mode code. This makes
restricted mode available as part of the standard build, but a server
will not go into restricted mode unless the relevant command line
options are specified, or bos setrestricted is run.

Document bos_setrestricted and bos_getrestricted, and the new
'-restricted' command line option. Add a note to the man pages of
all of the commands whose behaviour is affected by restricted mode.

Add 'setr' and 'getr' aliases for setrestart and getrestart so that
these documented shortcuts continue to work (otherwise they'd be
ambiguous against setrestricted and getrestricted). Note that
setre, setres, and setrest will not work once this patch is applied.

Change-Id: Ie69d21493ea5f78757f0a3d478de43fdaabd3c31
Reviewed-on: http://gerrit.openafs.org/1028
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
16 files changed:
acinclude.m4
doc/man-pages/pod8/bos.pod
doc/man-pages/pod8/bos_create.pod
doc/man-pages/pod8/bos_delete.pod
doc/man-pages/pod8/bos_exec.pod
doc/man-pages/pod8/bos_getlog.pod
doc/man-pages/pod8/bos_getrestricted.pod [new file with mode: 0644]
doc/man-pages/pod8/bos_install.pod
doc/man-pages/pod8/bos_prune.pod
doc/man-pages/pod8/bos_setrestricted.pod [new file with mode: 0644]
doc/man-pages/pod8/bos_uninstall.pod
doc/man-pages/pod8/bosserver.pod
src/bozo/bos.c
src/bozo/bosoprocs.c
src/bozo/bosserver.c
src/config/afsconfig-windows.h

index 58495705e727788706c631e503c23930f6917c9e..dd37867d5fdd6c37aa8d4a44dd8f27ad2300ed45 100644 (file)
@@ -51,7 +51,6 @@ AH_VERBATIM([OPENAFS_HEADER],
 #undef AFS_LARGEFILE_ENV
 #undef AFS_NAMEI_ENV
 #undef BITMAP_LATER
-#undef BOS_RESTRICTED_MODE
 #undef FAST_RESTART
 #undef FULL_LISTVOL_SWITCH
 #undef COMPLETION_H_EXISTS
@@ -104,12 +103,6 @@ AC_ARG_ENABLE([pam],
     [AS_HELP_STRING([--disable-pam], [disable PAM support])],
     ,
     [enable_pam="yes"])
-AC_ARG_ENABLE([bos-restricted-mode],
-    [AS_HELP_STRING([--enable-bos-restricted-mode],
-        [enable bosserver restricted mode which disables certain bosserver
-         functionality])],
-    , 
-    [enable_bos_restricted_mode="no"])
 AC_ARG_ENABLE([largefile-fileserver],
     [AS_HELP_STRING([--disable-largefile-fileserver],
         [disable large file support in fileserver])],
@@ -1478,10 +1471,6 @@ if test "$enable_icmp_pmtu_discovery" = "yes"; then
    fi
 fi
 
-if test "$enable_bos_restricted_mode" = "yes"; then
-       AC_DEFINE(BOS_RESTRICTED_MODE, 1, [define if you want to want bos restricted mode])
-fi
-
 if test "$enable_largefile_fileserver" = "yes"; then
        AC_DEFINE(AFS_LARGEFILE_ENV, 1, [define if you want large file fileserver])
 fi
index ce875a298a3b5ee97d8f3672a665cddddb677538..adeabca4ed685cf8f4bbfe09d8464592bfa8ab17 100644 (file)
@@ -36,8 +36,8 @@ restart>, B<bos shutdown>, B<bos start>, B<bos startup>, and B<bos stop>.
 =item *
 
 Commands to set and verify server process and server machine status: B<bos
-getlog>, B<bos getrestart>, B<bos setauth>, B<bos setrestart>, and B<bos
-status>.
+getlog>, B<bos getrestart>, B<bos getrestricted>, B<bos setauth>,
+B<bos setrestart>, B<bos setrestricted> and B<bos status>.
 
 =item *
 
@@ -252,6 +252,7 @@ L<bos_exec(8)>,
 L<bos_getdate(8)>,
 L<bos_getlog(8)>,
 L<bos_getrestart(8)>,
+L<bos_getrestricted(8)>,
 L<bos_help(8)>,
 L<bos_install(8)>,
 L<bos_listhosts(8)>,
@@ -266,6 +267,7 @@ L<bos_salvage(8)>,
 L<bos_setauth(8)>,
 L<bos_setcellname(8)>,
 L<bos_setrestart(8)>,
+L<bos_setrestricted(8)>,
 L<bos_shutdown(8)>,
 L<bos_start(8)>,
 L<bos_startup(8)>,
index 1f1001ad0af63d07e6681b2179662534c396b822..a0afefd7259338e1fdbed1e2efbeeecf82de60a3 100644 (file)
@@ -290,6 +290,9 @@ machine named by the B<-server> argument, or must be logged onto a server
 machine as the local superuser C<root> if the B<-localauth> flag is
 included.
 
+The B<bos create> command cannot be run against servers which are in
+restricted mode.
+
 =head1 NOTES
 
 If the B<-notifier> argument is included when this command is used to
index 9b4d558182fdb73644d1daf59f3cceb69a062416..6982d058c07193fcac1722b3c6813a7f7c9e8dc0 100644 (file)
@@ -87,6 +87,9 @@ machine named by the B<-server> argument, or must be logged onto a server
 machine as the local superuser C<root> if the B<-localauth> flag is
 included.
 
+The B<bos delete> command cannot be run against servers which are in
+restricted mode.
+
 =head1 SEE ALSO
 
 L<BosConfig(5)>,
index 4cdbe4e63b22bf3d33bf561edb0a718ab4f7ece2..fb65d535d4facb35d9bb02979c5f6fb0f4fee795 100644 (file)
@@ -79,6 +79,9 @@ machine named by the B<-server> argument, or must be logged onto a server
 machine as the local superuser C<root> if the B<-localauth> flag is
 included.
 
+The B<bos exec> command is not available on servers running in restricted
+mode.
+
 =head1 SEE ALSO
 
 L<bos(8)>
index 75d52eb3ae27ccddf49233ebc3f8e752b81b7a73..b397963c4297a3b08748e1f2866da11d2bf0a867 100644 (file)
@@ -141,6 +141,9 @@ machine named by the B<-server> argument, or must be logged onto a server
 machine as the local superuser C<root> if the B<-localauth> flag is
 included.
 
+When a server is in restricted mode, B<bos getlog> can only return the
+contents of the salvager's log.
+
 =head1 SEE ALSO
 
 L<bos(8)>
diff --git a/doc/man-pages/pod8/bos_getrestricted.pod b/doc/man-pages/pod8/bos_getrestricted.pod
new file mode 100644 (file)
index 0000000..f9706a9
--- /dev/null
@@ -0,0 +1,88 @@
+=head1 NAME
+
+bos_getrestricted - Displays whether a bos server is restricted or not
+
+=head1 SYNOPSIS
+
+=for html
+<div class="synopsis">
+
+B<bos getrestricted> S<<< B<-server> <I<machine name>> >>> S<<< [B<-cell> <I<cell name>>] >>>
+    [B<-noauth>] [B<-localauth>] [B<-help>]
+
+=for html
+</div>
+
+=head1 DESCRIPTION
+
+The bos getrestricted command shows whether the server machine named by
+the B<-server> argument is running in restricted mode.
+
+Restricted mode limits access to certain bos commands. See
+L<bos_setrestricted(8)> for details of which commands are disabled by
+restricting a server.
+
+Use the B<bos setrestricted> command to restrict, or un-restrict, a server.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-server> <I<machine name>>
+
+Indicates the server machine for which to display the restart
+times. Identify the machine by IP address or its host name (either
+fully-qualified or abbreviated unambiguously). For details, see L<bos(8)>.
+
+=item B<-cell> <I<cell name>>
+
+Names the cell in which to run the command. Do not combine this argument
+with the B<-localauth> flag. For more details, see L<bos(8)>.
+
+=item B<-noauth>
+
+Assigns the unprivileged identity C<anonymous> to the issuer. Do not
+combine this flag with the B<-localauth> flag. For more details, see
+L<bos(8)>.
+
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. The B<bos> command interpreter presents the
+ticket to the BOS Server during mutual authentication. Do not combine this
+flag with the B<-cell> or B<-noauth> options. For more details, see
+L<bos(8)>.
+
+=item B<-help>
+
+Prints the online help for this command. All other valid options are
+ignored.
+
+=back
+
+=head1 OUTPUT
+
+The output consists of a single line
+
+   Restricted mode is <val>
+
+Where <val> is "on" or "off"
+
+=head1 PRIVILEGE REQUIRED
+
+None
+
+=head1 SEE ALSO
+
+L<KeyFile(5)>,
+L<bos(8)>,
+L<bos_setrestricted(8)>,
+
+=head1 COPYRIGHT
+
+Copyright 2009 Simon Wilkinson <simon@sxw.org.uk>
+
+This documentation is covered by the BSD License as written in the
+doc/LICENSE file. This man page was written by Simon Wilkinson for
+OpenAFS.
+
index 3b1307b00160b6cba193e8b8cc663241b06397e5..4ccbca254011f0237e723e924e999cc81c94f490 100644 (file)
@@ -118,6 +118,9 @@ machine named by the B<-server> argument, or must be logged onto a server
 machine as the local superuser C<root> if the B<-localauth> flag is
 included.
 
+The B<bos install> command cannot be run against servers which are in
+restricted mode.
+
 =head1 SEE ALSO
 
 L<BosConfig(5)>,
index b85f96f06c4478fe3dbb59785838e3fa3d734fcb..fe6896c71f48d197bd0e6f020469cb78d045cdf3 100644 (file)
@@ -129,6 +129,9 @@ machine named by the B<-server> argument, or must be logged onto a server
 machine as the local superuser C<root> if the B<-localauth> flag is
 included.
 
+The B<bos prune> command cannot be run against servers which are in
+restricted mode.
+
 =head1 SEE ALSO
 
 L<KeyFile(5)>,
diff --git a/doc/man-pages/pod8/bos_setrestricted.pod b/doc/man-pages/pod8/bos_setrestricted.pod
new file mode 100644 (file)
index 0000000..4edef68
--- /dev/null
@@ -0,0 +1,88 @@
+=head1 NAME
+
+bos_setrestricted - place a server in restricted mode
+
+=head1 SYNOPSIS
+
+=for html
+<div class="synopsis">
+
+B<bos setrestricted> S<<< B<-server> <I<machine name>> >>> S<<< B<-mode> 1 >>>
+    S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>] [B<-help>]
+
+=for html
+</div>
+
+=head1 DESCRIPTION
+
+The B<bos restricted> command places the server in restricted mode. This
+mode increases the security of the bos server by removing access to a
+number of bos commands that are only used whilst configuring a system.
+
+When a server is in restricted mode, access to B<bos_exec>, B<bos uninstall>,
+B<bos install>, B<bos create>, B<bos install>, B<bos delete>, B<bos prune>
+is denied, and the use of B<bos getlog> is limited.
+
+=head1 CAUTIONS
+
+Once a server has been placed in restricted mode, it may not be opened up
+again using a remote command. That is, B<bos setrestricted> has no method
+of setting an unrestricted mode. Once a server is restricted, it can only
+be opened up again by sending it a SIGFPE, which must be done as root on
+the local machine.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-server> <I<machine name>>
+
+Indicates the server machine to restrict.
+
+=item B<-cell> <I<cell name>>
+
+Names the cell in which to run the command. Do not combine this argument
+with the B<-localauth> flag. For more details, see L<bos(8)>.
+
+=item B<-noauth>
+
+Assigns the unprivileged identity C<anonymous> to the issuer. Do not
+combine this flag with the B<-localauth> flag. For more details, see
+L<bos(8)>.
+
+=item B<-localauth>
+
+Constructs a server ticket using a key from the local
+F</usr/afs/etc/KeyFile> file. The B<bos> command interpreter presents the
+ticket to the BOS Server during mutual authentication. Do not combine this
+flag with the B<-cell> or B<-noauth> options. For more details, see
+L<bos(8)>.
+
+=item B<-help>
+
+Prints the online help for this command. All other valid options are
+ignored.
+
+=back
+
+=head1 PRIVILEGE REQUIRED
+
+The issuer must be listed in the F</usr/afs/etc/UserList> file on the
+machine named by the B<-server> argument, or must be logged in as the
+local superuser C<root> if the B<-localauth> flag is included.
+
+As noted above, this command cannot be run against servers which are
+already in restricted mode.
+
+=head1 SEE ALSO
+
+L<bos(8)>
+
+=head1 COPYRIGHT
+
+Copyright 2009 Simon wilkinson <simon@sxw.org.uk>
+
+This documentation is covered by the BSD License as written in the
+doc/LICENSE file. This man page was written by Simon Wilkinson for
+OpenAFS.
+
index fe20ba500311bc7034cf80213bd24a6bed5974e5..4b4995f5b072b2d38751c9bb548024d5a0dfaa12 100644 (file)
@@ -101,6 +101,9 @@ machine named by the B<-server> argument, or must be logged onto a server
 machine as the local superuser C<root> if the B<-localauth> flag is
 included.
 
+The B<bos uninstall> command cannot be run against servers running in
+restricted mode.
+
 =head1 SEE ALSO
 
 L<BosConfig(5)>,
index aa75e9b7c1dffdd9eb34dd7fa03991f0c53c99d3..8c7181df8393a06df1e1a4cd207b18e6925291b3 100644 (file)
@@ -9,7 +9,8 @@ bosserver - Initializes the BOS Server
 
 B<bosserver> [B<-noauth>] [B<-log>] [B<-enable_peer_stats>]
     S<<< [B<-auditlog> <I<log path>>] >>> [B<-audit-interface> (file | sysvmq)]
-    [B<-enable_process_stats>] [B<-allow-dotted-principals>] [B<-help>]
+    [B<-enable_process_stats>] [B<-allow-dotted-principals>]
+    [B<-restricted>] [B<-help>]
 
 =for html
 </div>
@@ -154,6 +155,15 @@ user.admin PTS entry. Sites whose Kerberos realms don't have these collisions
 between principal names may disable this check by starting the server
 with this option.
 
+=item B<-restricted>
+
+In normal operation, the bos server allows a super user to run any command.
+When the bos server is running in restricted mode (either due to this
+command line flag, or when configured by L<bos_setrestricted(8)>) a number
+of commands are unavailable. Note that this flag persists across reboots.
+Once a server has been placed in restricted mode, it can only be opened up
+by sending the SIGFPE signal.
+
 =item B<-help>
 
 Prints the online help for this command. All other valid options are
@@ -183,6 +193,7 @@ L<bos_exec(8)>,
 L<bos_getlog(8)>,
 L<bos_getrestart(8)>,
 L<bos_restart(8)>,
+L<bos_setrestricted(8)>,
 L<bos_shutdown(8)>,
 L<bos_start(8)>,
 L<bos_startup(8)>,
index fd79e4ff9dcf347c787b821df5d5adffa4aaa7f6..411e64dec8110f6e6bbec41bd6b45591b4f8a247 100644 (file)
@@ -1876,7 +1876,6 @@ DoStat(IN char *aname,
     return 0;
 }
 
-#ifdef BOS_RESTRICTED_MODE
 static int
 GetRestrict(struct cmd_syndesc *as, void *arock)
 {
@@ -1906,7 +1905,6 @@ SetRestrict(struct cmd_syndesc *as, void *arock)
        printf("bos: failed to set restricted mode (%s)\n", em(code));
     return 0;
 }
-#endif
 
 static void
 add_std_args(register struct cmd_syndesc *ts)
@@ -2135,11 +2133,13 @@ main(int argc, char **argv)
     cmd_AddParm(ts, "-newbinary", CMD_FLAG, CMD_OPTIONAL,
                "set new binary restart time");
     add_std_args(ts);
+    cmd_CreateAlias(ts, "setr");
 
     ts = cmd_CreateSyntax("getrestart", GetRestartCmd, NULL,
                          "get restart times");
     cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
     add_std_args(ts);
+    cmd_CreateAlias(ts, "getr");
 
     ts = cmd_CreateSyntax("salvage", SalvageCmd, NULL,
                          "salvage partition or volumes");
@@ -2209,7 +2209,6 @@ main(int argc, char **argv)
     cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
     add_std_args(ts);
 
-#ifdef BOS_RESTRICTED_MODE
     ts = cmd_CreateSyntax("getrestricted", GetRestrict, NULL,
                          "get restrict mode");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
@@ -2220,7 +2219,6 @@ main(int argc, char **argv)
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
     cmd_AddParm(ts, "-mode", CMD_SINGLE, 0, "mode to set");
     add_std_args(ts);
-#endif
 #endif
 
     code = cmd_Dispatch(argc, argv);
index 9bd56a0b2c9495664c4bf05d4de52485aeb94ee2..66e10f54cb2a5075e0851266789c09918260fd40 100644 (file)
@@ -47,9 +47,7 @@ extern struct ktime bozo_nextRestartKT, bozo_nextDayKT;
 extern struct afsconf_dir *bozo_confdir;
 extern int bozo_newKTs;
 extern int DoLogging;
-#ifdef BOS_RESTRICTED_MODE
 extern int bozo_isrestricted;
-#endif
 
 afs_int32
 SBOZO_GetRestartTime(struct rx_call *acall, afs_int32 atype, struct bozo_netKTime *aktime)
@@ -125,12 +123,10 @@ SBOZO_Exec(struct rx_call *acall, char *acmd)
        code = BZACCESS;
        goto fail;
     }
-#ifdef BOS_RESTRICTED_MODE
     if (bozo_isrestricted) {
        code = BZACCESS;
        goto fail;
     }
-#endif
     if (DoLogging)
        bozo_Log("%s is executing the shell command '%s'\n", caller, acmd);
 
@@ -192,13 +188,11 @@ SBOZO_UnInstall(struct rx_call *acall, register char *aname)
        osi_auditU(acall, BOS_UnInstallEvent, code, AUD_STR, aname, AUD_END);
        return code;
     }
-#ifdef BOS_RESTRICTED_MODE
     if (bozo_isrestricted) {
        code = BZACCESS;
        osi_auditU(acall, BOS_UnInstallEvent, code, AUD_STR, aname, AUD_END);
        return code;
     }
-#endif
 
     /* construct local path from canonical (wire-format) path */
     if (ConstructLocalBinPath(aname, &filepath)) {
@@ -291,10 +285,8 @@ SBOZO_Install(struct rx_call *acall, char *aname, afs_int32 asize, afs_int32 mod
 
     if (!afsconf_SuperUser(bozo_confdir, acall, caller))
        return BZACCESS;
-#ifdef BOS_RESTRICTED_MODE
     if (bozo_isrestricted)
        return BZACCESS;
-#endif
 
     /* construct local path from canonical (wire-format) path */
     if (ConstructLocalBinPath(aname, &fpp)) {
@@ -782,7 +774,6 @@ SBOZO_CreateBnode(struct rx_call *acall, char *atype, char *ainstance,
        code = BZACCESS;
        goto fail;
     }
-#ifdef BOS_RESTRICTED_MODE
     if (bozo_isrestricted) {
        if (strcmp(atype, "cron") || strcmp(ainstance, "salvage-tmp")
            || strcmp(ap2, "now")
@@ -792,7 +783,6 @@ SBOZO_CreateBnode(struct rx_call *acall, char *atype, char *ainstance,
            goto fail;
        }
     }
-#endif
 
     code =
        bnode_Create(atype, ainstance, &tb, ap1, ap2, ap3, ap4, ap5, notifier,
@@ -836,12 +826,10 @@ SBOZO_DeleteBnode(struct rx_call *acall, char *ainstance)
        code = BZACCESS;
        goto fail;
     }
-#ifdef BOS_RESTRICTED_MODE
     if (bozo_isrestricted) {
        code = BZACCESS;
        goto fail;
     }
-#endif
     if (DoLogging)
        bozo_Log("%s is executing DeleteBnode '%s'\n", caller, ainstance);
 
@@ -1174,12 +1162,10 @@ SBOZO_Prune(struct rx_call *acall, afs_int32 aflags)
        code = BZACCESS;
        goto fail;
     }
-#ifdef BOS_RESTRICTED_MODE
     if (bozo_isrestricted) {
        code = BZACCESS;
        goto fail;
     }
-#endif
     if (DoLogging)
        bozo_Log("%s is executing Prune (flags=%d)\n", caller, aflags);
 
@@ -1436,13 +1422,11 @@ SBOZO_GetLog(register struct rx_call *acall, char *aname)
        code = BZACCESS;
        goto fail;
     }
-#ifdef BOS_RESTRICTED_MODE
     if (bozo_isrestricted && strchr(aname, '/')
        && strcmp(aname, AFSDIR_CANONICAL_SERVER_SLVGLOG_FILEPATH)) {
        code = BZACCESS;
        goto fail;
     }
-#endif
 
     /* construct local path from canonical (wire-format) path */
     if (ConstructLocalLogPath(aname, &logpath)) {
@@ -1517,7 +1501,6 @@ SBOZO_GetInstanceStrings(struct rx_call *acall, char *abnodeName,
     return BZNOENT;
 }
 
-#ifdef BOS_RESTRICTED_MODE
 afs_int32
 SBOZO_GetRestrictedMode(struct rx_call *acall, afs_int32 *arestmode)
 {
@@ -1542,22 +1525,9 @@ SBOZO_SetRestrictedMode(struct rx_call *acall, afs_int32 arestmode)
     }
     bozo_isrestricted = arestmode;
     code = WriteBozoFile(0);
-  fail:
-    return code;
-}
-#else
-afs_int32
-SBOZO_GetRestrictedMode(struct rx_call *acall, afs_int32 *arestmode)
-{
-    return RXGEN_OPCODE;
-}
 
-afs_int32
-SBOZO_SetRestrictedMode(struct rx_call *acall, afs_int32 arestmode)
-{
-    return RXGEN_OPCODE;
+    return code;
 }
-#endif
 
 void *
 bozo_ShutdownAndExit(void *param)
index df369028a242bd061d4536812b595c5bf24b256f..49bc39b11ac301fad74af57f2563e754c1c9a6d1 100644 (file)
@@ -78,7 +78,6 @@ int rxkadDisableDotCheck = 0;
 #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
 afs_uint32 SHostAddrs[ADDRSPERSITE];
 
-#ifdef BOS_RESTRICTED_MODE
 int bozo_isrestricted = 0;
 int bozo_restdisable = 0;
 
@@ -89,7 +88,6 @@ bozo_insecureme(int sig)
     bozo_isrestricted = 0;
     bozo_restdisable = 1;
 }
-#endif
 
 struct bztemp {
     FILE *file;
@@ -281,9 +279,7 @@ ReadBozoFile(char *aname)
     afs_int32 i, goal;
     struct bnode *tb;
     char *parms[MAXPARMS];
-#ifdef BOS_RESTRICTED_MODE
     int rmode;
-#endif
 
     /* rename BozoInit to BosServer for the user */
     if (!aname) {
@@ -367,7 +363,7 @@ ReadBozoFile(char *aname)
            bozo_nextDayKT.sec = ktsec;
            continue;
        }
-#ifdef BOS_RESTRICTED_MODE
+
        if (strncmp(tbuffer, "restrictmode", 12) == 0) {
            code = sscanf(tbuffer, "restrictmode %d", &rmode);
            if (code != 1) {
@@ -381,7 +377,6 @@ ReadBozoFile(char *aname)
            bozo_isrestricted = rmode;
            continue;
        }
-#endif
 
        if (strncmp("bnode", tbuffer, 5) != 0) {
            code = -1;
@@ -466,9 +461,8 @@ WriteBozoFile(char *aname)
     if (!tfile)
        return -1;
     btemp.file = tfile;
-#ifdef BOS_RESTRICTED_MODE
+
     fprintf(tfile, "restrictmode %d\n", bozo_isrestricted);
-#endif
     fprintf(tfile, "restarttime %d %d %d %d %d\n", bozo_nextRestartKT.mask,
            bozo_nextRestartKT.day, bozo_nextRestartKT.hour,
            bozo_nextRestartKT.min, bozo_nextRestartKT.sec);
@@ -526,12 +520,11 @@ BozoDaemon(void *unused)
        IOMGR_Sleep(60);
        now = FT_ApproxTime();
 
-#ifdef BOS_RESTRICTED_MODE
        if (bozo_restdisable) {
            bozo_Log("Restricted mode disabled by signal\n");
            bozo_restdisable = 0;
        }
-#endif
+
        if (bozo_newKTs) {      /* need to recompute restart times */
            bozo_newKTs = 0;    /* done for a while */
            nextRestart = ktime_next(&bozo_nextRestartKT, BOZO_MINSKIP);
@@ -753,9 +746,7 @@ main(int argc, char **argv, char **envp)
     sigaction(SIGABRT, &nsa, NULL);
 #endif
     osi_audit_init();
-#ifdef BOS_RESTRICTED_MODE
     signal(SIGFPE, bozo_insecureme);
-#endif
 
 #ifdef AFS_NT40_ENV
     /* Initialize winsock */
@@ -816,11 +807,9 @@ main(int argc, char **argv, char **envp)
        } else if (strcmp(argv[code], "-enable_process_stats") == 0) {
            rx_enableProcessRPCStats();
        }
-#ifdef BOS_RESTRICTED_MODE
        else if (strcmp(argv[code], "-restricted") == 0) {
            bozo_isrestricted = 1;
        }
-#endif
        else if (strcmp(argv[code], "-rxbind") == 0) {
            rxBind = 1;
        }
index 05de66a826246be4f96a386514a33510cbc0140e..7248592e8a5fc67be83cb915570134cd1a13c60a 100644 (file)
 /*#undef AFS_AFSDB_ENV*/
 #define AFS_AFSDB_ENV 1
 #undef AFS_NAMEI_ENV
-#define BOS_RESTRICTED_MODE
 
 #undef FAST_RESTART
 #undef BITMAP_LATER