Replaced the "rm -rf" with remove().
diff --git a/lib/rmobj.c b/lib/rmobj.c
index 399b63b..dd9e777 100644
--- a/lib/rmobj.c
+++ b/lib/rmobj.c
@@ -30,7 +30,7 @@
  * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
  */
 
-/* $Id: rmobj.c,v 1.3 2003/07/25 16:16:47 robbiew Exp $ */
+/* $Id: rmobj.c,v 1.4 2003/07/28 16:03:02 robbiew Exp $ */
 
 /**********************************************************
  *
@@ -99,7 +99,6 @@
    char          dirobj[PATH_MAX];  /* object inside directory to modify */
    struct stat   statbuf;           /* used to hold stat information */
    static char   err_msg[1024];     /* error message */
-   char		 foo[120];	    /* used to hold command line for system() call */
 
    /* Determine the file type */
    if ( lstat(obj, &statbuf) < 0 ) {
@@ -183,12 +182,10 @@
             return -1;
          }
       } else {
-         /* The directory is not linked*/
-	 sprintf(foo,"rm -rf %s",obj);
-	 strcat(foo,"");
-         if ( system(foo) < 0 ) {
+         /* The directory is not linked; remove() can be used */
+         if ( remove(obj) < 0 ) {
             if ( errmsg != NULL ) {
-               sprintf(err_msg, "rmdir(%s) failed; errno=%d: %s",
+               sprintf(err_msg, "remove(%s) failed; errno=%d: %s",
                        obj, errno, SYSERR);
                *errmsg = err_msg;
             }