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:
Dan Walsh 2011-09-19 06:52:45 -04:00
parent 5113c7563a
commit aa09b7d954
4 changed files with 13 additions and 54 deletions

1
.gitignore vendored
View File

@ -187,3 +187,4 @@ libselinux-2.0.96.tgz
/libselinux-2.1.0.tgz
/libselinux-2.1.4.tgz
/libselinux-2.1.5.tgz
/libselinux-2.1.6.tgz

View File

@ -165,7 +165,7 @@ index 3b8346d..02f3f98 100644
goto finish;
}
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
+++ b/libselinux/src/matchpathcon.c
@@ -2,6 +2,7 @@
@ -185,53 +185,3 @@ index 9717b14..df83b30 100644
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;

View File

@ -6,8 +6,8 @@
Summary: SELinux library and simple utilities
Name: libselinux
Version: 2.1.5
Release: 5%{?dist}
Version: 2.1.6
Release: 1%{?dist}
License: Public Domain
Group: System Environment/Libraries
Source: %{name}-%{version}.tgz
@ -231,6 +231,14 @@ rm -rf %{buildroot}
%{ruby_sitearch}/selinux.so
%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
- Switch to use ":" as prefix separator rather then ";"

View File

@ -1 +1 @@
e0da22061511b669c324bb2c96d2c668 libselinux-2.1.5.tgz
94fa8daf439f79db14821d4ff7f68f98 libselinux-2.1.6.tgz