Oops, matchpathcon() wants st_mode, not the entire struct stat
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 8 May 2008 10:40:26 +0000 (13:40 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 8 May 2008 10:40:26 +0000 (13:40 +0300)
rpmdb/rpmdb.c

index 2bff34e..72d86ad 100644 (file)
@@ -3302,7 +3302,7 @@ static int rpmdbMoveDatabase(const char * prefix,
 
            if (selinux) {
                security_context_t scon = NULL;
-               if (matchpathcon(dest, &st, &scon) != -1) {
+               if (matchpathcon(dest, st.st_mode, &scon) != -1) {
                    (void) setfilecon(dest, scon);
                    freecon(scon);
                }