瀏覽代碼

drop suidwrapper for rt-mailgate

Michael van Elst 22 年之前
父節點
當前提交
837cac250f
共有 2 個文件被更改,包括 2 次插入42 次删除
  1. 0 21
      rt/rt-mailgate.c
  2. 2 21
      rt/rt.spec

+ 0 - 21
rt/rt-mailgate.c

@@ -1,21 +0,0 @@
-#include <sys/types.h>
-#include <unistd.h>
-
-#define DIR  "@l_prefix@/libexec/rt"
-#define PROG "@l_prefix@/libexec/rt/tools/rt-mailgate"
-
-int main(int argc, char *argv[])
-{
-    static char *const myenv[] = {
-        "PATH=/bin:/usr/bin",
-        NULL
-    };
-
-    if (chdir(DIR) == -1) {
-        perror("chdir");
-        exit(1);
-    }
-
-    execve(PROG, argv, myenv);
-}
-

+ 2 - 21
rt/rt.spec

@@ -66,9 +66,8 @@ Source12:     rtsetup
 Source13:     rtcleanup
 Source14:     rtupgrade
 Source15:     rtapachectl
-Source16:     rt-mailgate.c
-Source17:     rtapache.conf
-Source18:     config.layout
+Source16:     rtapache.conf
+Source17:     config.layout
 
 #   build information
 Prefix:       %{l_prefix}
@@ -116,18 +115,6 @@ AutoReqProv:  no
       rt-%{V_real}/Makefile.in
 
 %build
-    #   compile SUID wrapper
-    mkdir suidwrap
-    ( cd suidwrap
-      cp %{SOURCE rt-mailgate.c} .
-      %{l_shtool} subst \
-        -e 's;@l_prefix@;%{l_prefix};g' \
-        -e 's;@l_rusr@;%{l_rusr};g' \
-        -e 's;@l_rgrp@;%{l_rgrp};g' \
-        rt-mailgate.c
-      %{l_cc} -o rt-mailgate rt-mailgate.c
-    ) || exit $?
-
     ( cd rt-%{V_real}
       %{l_shtool} subst \
         -e 's;/usr/sbin/sendmail;%{l_prefix}/sbin/sendmail;g' \
@@ -376,20 +363,14 @@ AutoReqProv:  no
         $RPM_BUILD_ROOT%{l_prefix}/bin/mason_handler.fcgi \
         $RPM_BUILD_ROOT%{l_prefix}/cgi/rt/
     mv \
-        $RPM_BUILD_ROOT%{l_prefix}/bin/rt-mailgate \
         $RPM_BUILD_ROOT%{l_prefix}/bin/rt-crontool \
         $RPM_BUILD_ROOT%{l_prefix}/libexec/rt/tools/
-    %{l_shtool} install -c -s -m 755 \
-        suidwrap/rt-mailgate \
-        $RPM_BUILD_ROOT%{l_prefix}/bin/
 
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
         %{l_files_std} \
         '%{l_prefix}/libexec/rt' \
-        '%attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/libexec/rt/tools/rt-mailgate' \
         '%attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/libexec/rt/tools/rt-setup-database' \
         '%attr(755,%{l_musr},%{l_mgrp}) %{l_prefix}/libexec/rt/tools/rt-crontool' \
-        '%attr(6755,%{l_rusr},%{l_rgrp}) %{l_prefix}/bin/rt-mailgate' \
         '%config %attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/rt/RT_SiteConfig.pm' \
         '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-data' \
         '%attr(750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/rt/mason-data/*' \