[Midnightbsd-cvs] src [7385] trunk/lib/libmport/bundle_read_install_pkg.c: don' t mess with modes in the pre step as we're not using them.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Nov 29 12:29:46 EST 2015


Revision: 7385
          http://svnweb.midnightbsd.org/src/?rev=7385
Author:   laffer1
Date:     2015-11-29 12:29:45 -0500 (Sun, 29 Nov 2015)
Log Message:
-----------
don't mess with modes in the pre step as we're not using them.

Modified Paths:
--------------
    trunk/lib/libmport/bundle_read_install_pkg.c

Modified: trunk/lib/libmport/bundle_read_install_pkg.c
===================================================================
--- trunk/lib/libmport/bundle_read_install_pkg.c	2015-11-29 17:26:53 UTC (rev 7384)
+++ trunk/lib/libmport/bundle_read_install_pkg.c	2015-11-29 17:29:45 UTC (rev 7385)
@@ -81,15 +81,10 @@
     char cwd[FILENAME_MAX];
     char file[FILENAME_MAX];
     sqlite3_stmt *assets = NULL;
-    sqlite3 *db;
+    sqlite3 *db = mport->db;
     mportAssetListEntryType type;
     const char *data;
-    uid_t owner = 0; /* root */
-    gid_t group = 0; /* wheel */
-    char *mode = NULL;
 
-    db = mport->db;
-
     /* run mtree */
     if (run_mtree(mport, bundle, pkg) != MPORT_OK)
         RETURN_CURRENT_ERROR;
@@ -128,22 +123,6 @@
                     goto ERROR;
 
                 break;
-            case ASSET_CHMOD:
-                printf("asset_chmod %s, %s\n", mode, data);
-                if (mode != NULL)
-                    free(mode);
-                /* TODO: should we reset the mode rather than NULL here */
-                if (data == NULL)
-                    mode = NULL;
-                else
-                    mode = strdup(data);
-                break;
-            case ASSET_CHOWN:
-                owner = mport_get_uid(data);
-                break;
-            case ASSET_CHGRP:
-                group = mport_get_gid(data);
-                break;
             case ASSET_PREEXEC:
                 if (mport_run_asset_exec(mport, data, cwd, file) != MPORT_OK)
                     goto ERROR;



More information about the Midnightbsd-cvs mailing list