Changeset 423f4e in git


Ignore:
Timestamp:
Jun 30, 2022, 4:42:35 PM (23 months ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd08f5f0bb3329b8ca19f23b74cb1473686415c3a')
Children:
cd85559781a82f98cee87f0b7349312ac19f2720
Parents:
3ec443ec8a8353d01c006883f4c1f12b732a816d
Message:
allow (some)help in restricted mode
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/fehelp.cc

    r3ec443e r423f4e  
    812812static BOOLEAN heGenInit(int warn, int br)
    813813{
    814   if (FE_OPT_NO_SHELL_FLAG)
    815   {
    816     if (warn) WarnS("restricted mod: generic help not available");
    817     return FALSE;
    818   }
    819814  if (heHelpBrowsers[br].required==NULL) return TRUE;
    820815  const char *p=heHelpBrowsers[br].required;
     
    859854                 if ((op=='O') && (strcmp(name,S_UNAME)!=0))
    860855                   return FALSE;
    861                  if ((op=='E') && (omFindExec(name,exec)==NULL))
     856                 if ((op=='E') && ((omFindExec(name,exec)==NULL) || FE_OPT_NO_SHELL_FLAG))
    862857                 {
    863858                   if (warn) Warn("executable `%s` not found",name);
     
    876871static void heGenHelp(heEntry hentry, int br)
    877872{
    878   if (FE_OPT_NO_SHELL_FLAG) return;
    879873  char sys[MAX_SYSCMD_LEN];
    880874  const char *p=heHelpBrowsers[br].action;
     
    10111005  }
    10121006  Print("running `%s`\n",sys);
    1013   (void) system(sys);
     1007  if (!FE_OPT_NO_SHELL_FLAG) (void) system(sys);
    10141008}
    10151009
Note: See TracChangeset for help on using the changeset viewer.