Update to upstream
* utils: matchpathcon: remove duplicate declaration * src: matchpathcon: use myprintf not fprintf * src: matchpathcon: make sure resolved path starts * put libselinux.so.1 in /lib not /usr/lib * tree: default make target to all not
This commit is contained in:
parent
5113c7563a
commit
aa09b7d954
1
.gitignore
vendored
1
.gitignore
vendored
@ -187,3 +187,4 @@ libselinux-2.0.96.tgz
|
|||||||
/libselinux-2.1.0.tgz
|
/libselinux-2.1.0.tgz
|
||||||
/libselinux-2.1.4.tgz
|
/libselinux-2.1.4.tgz
|
||||||
/libselinux-2.1.5.tgz
|
/libselinux-2.1.5.tgz
|
||||||
|
/libselinux-2.1.6.tgz
|
||||||
|
@ -165,7 +165,7 @@ index 3b8346d..02f3f98 100644
|
|||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c
|
diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c
|
||||||
index 9717b14..df83b30 100644
|
index 5914afa..df83b30 100644
|
||||||
--- a/libselinux/src/matchpathcon.c
|
--- a/libselinux/src/matchpathcon.c
|
||||||
+++ b/libselinux/src/matchpathcon.c
|
+++ b/libselinux/src/matchpathcon.c
|
||||||
@@ -2,6 +2,7 @@
|
@@ -2,6 +2,7 @@
|
||||||
@ -185,53 +185,3 @@ index 9717b14..df83b30 100644
|
|||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -353,7 +354,7 @@ static int symlink_realpath(const char *name, char *resolved_path)
|
|
||||||
|
|
||||||
tmp_path = strdup(name);
|
|
||||||
if (!tmp_path) {
|
|
||||||
- fprintf(stderr, "symlink_realpath(%s) strdup() failed: %s\n",
|
|
||||||
+ myprintf("symlink_realpath(%s) strdup() failed: %s\n",
|
|
||||||
name, strerror(errno));
|
|
||||||
rc = -1;
|
|
||||||
goto out;
|
|
||||||
@@ -374,21 +375,24 @@ static int symlink_realpath(const char *name, char *resolved_path)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!p) {
|
|
||||||
- fprintf(stderr, "symlink_realpath(%s) realpath() failed: %s\n",
|
|
||||||
+ myprintf("symlink_realpath(%s) realpath() failed: %s\n",
|
|
||||||
name, strerror(errno));
|
|
||||||
rc = -1;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
len = strlen(p);
|
|
||||||
- if (len + strlen(last_component) + 1 > PATH_MAX) {
|
|
||||||
- fprintf(stderr, "symlink_realpath(%s) failed: Filename too long \n",
|
|
||||||
+ if (len + strlen(last_component) + 2 > PATH_MAX) {
|
|
||||||
+ myprintf("symlink_realpath(%s) failed: Filename too long \n",
|
|
||||||
name);
|
|
||||||
+ errno=ENAMETOOLONG;
|
|
||||||
rc = -1;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
resolved_path += len;
|
|
||||||
+ strcpy(resolved_path, "/");
|
|
||||||
+ resolved_path += 1;
|
|
||||||
strcpy(resolved_path, last_component);
|
|
||||||
out:
|
|
||||||
free(tmp_path);
|
|
||||||
diff --git a/libselinux/utils/matchpathcon.c b/libselinux/utils/matchpathcon.c
|
|
||||||
index 2fa21bc..5f0a4c2 100644
|
|
||||||
--- a/libselinux/utils/matchpathcon.c
|
|
||||||
+++ b/libselinux/utils/matchpathcon.c
|
|
||||||
@@ -45,7 +45,7 @@ int printmatchpathcon(char *path, int header, int mode)
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
- int i, init = 0, rc = 0;
|
|
||||||
+ int i, init = 0;
|
|
||||||
int header = 1, opt;
|
|
||||||
int verify = 0;
|
|
||||||
int notrans = 0;
|
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
Summary: SELinux library and simple utilities
|
Summary: SELinux library and simple utilities
|
||||||
Name: libselinux
|
Name: libselinux
|
||||||
Version: 2.1.5
|
Version: 2.1.6
|
||||||
Release: 5%{?dist}
|
Release: 1%{?dist}
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source: %{name}-%{version}.tgz
|
Source: %{name}-%{version}.tgz
|
||||||
@ -231,6 +231,14 @@ rm -rf %{buildroot}
|
|||||||
%{ruby_sitearch}/selinux.so
|
%{ruby_sitearch}/selinux.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 19 2011 Dan Walsh <dwalsh@redhat.com> - 2.1.6-1
|
||||||
|
-Update to upstream
|
||||||
|
* utils: matchpathcon: remove duplicate declaration
|
||||||
|
* src: matchpathcon: use myprintf not fprintf
|
||||||
|
* src: matchpathcon: make sure resolved path starts
|
||||||
|
* put libselinux.so.1 in /lib not /usr/lib
|
||||||
|
* tree: default make target to all not
|
||||||
|
|
||||||
* Wed Sep 14 2011 Dan Walsh <dwalsh@redhat.com> - 2.1.5-5
|
* Wed Sep 14 2011 Dan Walsh <dwalsh@redhat.com> - 2.1.5-5
|
||||||
- Switch to use ":" as prefix separator rather then ";"
|
- Switch to use ":" as prefix separator rather then ";"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user