OSSP CVS Repository

ossp - Difference in ossp-pkg/rc/rc_proc.c versions 1.29 and 1.30
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/rc/rc_proc.c 1.29 -> 1.30

--- rc_proc.c    2003/05/21 12:49:21     1.29
+++ rc_proc.c    2003/05/21 15:16:41     1.30
@@ -224,9 +224,15 @@
                 else
                     ppSectmp[nRcs] = NULL;
             }
-            qsort((void *)ppSectmp, (size_t)pRc->m_pAnal->m_nRcs, sizeof(rc_section_t *), priCompare);
+            qsort((void *)ppSectmp, (size_t)pRc->m_pAnal->m_nRcs, \
+                sizeof(rc_section_t *), priCompare);
             nTmp = 0;
             while (nTmp < pRc->m_pAnal->m_nRcs && ppSectmp[nTmp]) {
+                if ((szTmp = (char *)sectionGetlogin(ppSectmp[nTmp])) != NULL) {
+                    scriptAppend(pFatscript, "#su ", strlen("#su "));
+                    scriptAppend(pFatscript, szTmp, strlen(szTmp));
+                    scriptAppend(pFatscript, "\n", strlen("\n") + 1);
+                }
                 szTmp = (char *)sectionGetdata(ppSectmp[nTmp]);
                 scriptAppend(pFatscript, szTmp, strlen(szTmp) + 1);
                 nTmp++;
@@ -238,8 +244,12 @@
         szTmpfile = (char *)configGetval(RC_TMP_VAL);
         nTmpname = (strlen(szTmpfile) + strlen(RC_EVL_TMP) + \
                     strlen(RC_EVL_SUF) + 1) * sizeof(char);
+        if (*(szTmpfile + (strlen(szTmpfile) - 1) * sizeof(char)) != '/')
+            nTmpname += sizeof(char);
         szTmpfile = malloc(nTmpname);
         strcpy(szTmpfile, configGetval(RC_TMP_VAL));
+        if (*(szTmpfile + (strlen(szTmpfile) - 1) * sizeof(char)) != '/')
+            *(szTmpfile + (strlen(szTmpfile)) * sizeof(char)) = '/';
         strcat(szTmpfile, RC_EVL_TMP);
         mktemp(szTmpfile);
         strcat(szTmpfile, RC_EVL_SUF);

CVSTrac 2.0.1