Fossil

Check-in [866f92fa]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:It isn't necessary to allow id either for the status command as nobody should be trying to setuid.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | pledge-additions
Files: files | file ages | folders
SHA3-256:866f92faa9cf7e89cae133b0c88936b34cf800ee1f43b5d1383725e80128f2af
User & Date: andybradford 2018-01-20 20:46:21
Context
2018-01-20
20:47
Restrict the process further now that these are no longer required in status command. check-in: 36c76a13 user: andybradford tags: pledge-additions
20:46
It isn't necessary to allow id either for the status command as nobody should be trying to setuid. check-in: 866f92fa user: andybradford tags: pledge-additions
2018-01-19
19:15
Remove call of "getuid()" added on previous commit because it is not available on windows. For the pledge() call, always allow "chown" for now, even if not running as root. check-in: 6b41a7e8 user: mgagnon tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkin.c.

470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
  int showHdr = command==CHANGES && find_option("header", 0, 0);
  int verboseFlag = command==CHANGES && find_option("verbose", "v", 0);
  const char *zIgnoreFlag = find_option("ignore", 0, 1);
  unsigned scanFlags = 0;
  unsigned flags = 0;
  int vid, i;

  fossil_pledge("stdio rpath wpath cpath id flock tty chown");

  /* Load affirmative flag options. */
  for( i=0; i<count(flagDefs); ++i ){
    if( (command==CHANGES || !(flagDefs[i].mask & C_CLASSIFY))
     && find_option(flagDefs[i].option, 0, 0) ){
      flags |= flagDefs[i].mask;
    }







|







470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
  int showHdr = command==CHANGES && find_option("header", 0, 0);
  int verboseFlag = command==CHANGES && find_option("verbose", "v", 0);
  const char *zIgnoreFlag = find_option("ignore", 0, 1);
  unsigned scanFlags = 0;
  unsigned flags = 0;
  int vid, i;

  fossil_pledge("stdio rpath wpath cpath flock tty chown");

  /* Load affirmative flag options. */
  for( i=0; i<count(flagDefs); ++i ){
    if( (command==CHANGES || !(flagDefs[i].mask & C_CLASSIFY))
     && find_option(flagDefs[i].option, 0, 0) ){
      flags |= flagDefs[i].mask;
    }