/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to plugins.d/mandos-client.c

  • Committer: teddy at recompile
  • Date: 2020-04-08 18:40:10 UTC
  • Revision ID: teddy@recompile.se-20200408184010-lvs5alrq2gqcpb12
Tags: version-1.8.11-1
Version 1.8.11-1

* Makefile (version): Change to "1.8.11".
* NEWS (Version 1.8.11): Add new entry.
* debian/changelog (1.8.11-1): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
1074
1074
      ret = setgid(0);
1075
1075
      if(ret == -1){
1076
1076
        perror_plus("setgid");
 
1077
        close(devnull);
1077
1078
        _exit(EX_NOPERM);
1078
1079
      }
1079
1080
      /* Reset supplementary groups */
1081
1082
      ret = setgroups(0, NULL);
1082
1083
      if(ret == -1){
1083
1084
        perror_plus("setgroups");
 
1085
        close(devnull);
1084
1086
        _exit(EX_NOPERM);
1085
1087
      }
1086
1088
    }
1087
1089
    ret = dup2(devnull, STDIN_FILENO);
1088
1090
    if(ret == -1){
1089
1091
      perror_plus("dup2(devnull, STDIN_FILENO)");
 
1092
      close(devnull);
1090
1093
      _exit(EX_OSERR);
1091
1094
    }
1092
1095
    ret = close(devnull);
1093
1096
    if(ret == -1){
1094
1097
      perror_plus("close");
1095
 
      _exit(EX_OSERR);
1096
1098
    }
1097
1099
    ret = dup2(STDERR_FILENO, STDOUT_FILENO);
1098
1100
    if(ret == -1){
1133
1135
  }
1134
1136
  if(pid == -1){
1135
1137
    perror_plus("fork");
 
1138
    close(devnull);
1136
1139
    return false;
1137
1140
  }
 
1141
  ret = close(devnull);
 
1142
  if(ret == -1){
 
1143
    perror_plus("close");
 
1144
  }
1138
1145
  int status;
1139
1146
  pid_t pret = -1;
1140
1147
  errno = 0;