pacman/lib/libalpm
Andrew Gregory 0fd8455c66 unlink_file: strip trailing slashes
If the user replaces a directory with a symlink, libalpm would get
confused because the trailing slash causes system calls to resolve the
symlink.  This leads to errors and a misleading message during upgrades.
Even though libalpm does not support this, it should not be giving
misleading errors.

Also adds an overflow check.

Fixes FS#51377

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
(cherry picked from commit 16b91f798f)
2017-05-08 23:27:44 -04:00
..
po Regenerate translations for 5.0.1 2016-02-23 13:09:39 +10:00
.gitignore libalpm: add pkg-config file 2012-04-25 20:02:36 -04:00
add.c libalpm: Use archive_read_extract2 2017-05-08 23:27:44 -04:00
add.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
alpm.c Always use proper error code in alpm_initialize. 2017-05-08 23:27:40 -04:00
alpm.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
alpm_list.c add alpm_list_append 2016-01-15 14:47:36 +10:00
alpm_list.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
backup.c Release resources on error paths. 2017-05-08 23:27:41 -04:00
backup.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
base64.c base64.c: comment out unused variable 2014-01-15 15:54:56 +10:00
base64.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
be_local.c Return boolean from db_populate 2017-05-08 23:27:43 -04:00
be_package.c Reject files larger than 16384 bytes in read_sigfile. 2017-05-08 23:27:41 -04:00
be_sync.c Change type of count in be_sync 2017-05-08 23:27:43 -04:00
conflict.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
conflict.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
db.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
db.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
delta.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
delta.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
deps.c recursedeps: include cyclic dependencies 2017-05-08 23:27:40 -04:00
deps.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
diskspace.c Use f_bavail for diskspace calculations 2017-05-08 23:27:44 -04:00
diskspace.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
dload.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
dload.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
error.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
filelist.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
filelist.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
graph.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
graph.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
group.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
group.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
handle.c make alpm_unlock and trans_interrupt async safe 2016-02-23 12:41:36 +10:00
handle.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
hook.c hook.c: replace fstatat with stat 2017-05-08 23:27:41 -04:00
hook.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
ini.c run hooks during trans_commit 2015-10-18 10:59:23 +10:00
ini.h run hooks during trans_commit 2015-10-18 10:59:23 +10:00
libalpm.pc.in Add large file support CFLAGS to pkgconfig file 2015-12-04 11:06:49 +10:00
libarchive-compat.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
log.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
log.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
Makefile.am run hooks during trans_commit 2015-10-18 10:59:23 +10:00
md5.c Use 32-bit wide integer type in PolarSSL code 2012-01-07 11:27:41 -06:00
md5.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
package.c do not rely on localdb for hook matching 2016-02-23 12:15:43 +10:00
package.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
pkghash.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
pkghash.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
rawstr.c Remove ts and sw from vim modeline when noet is set 2014-01-28 20:19:25 +10:00
remove.c unlink_file: strip trailing slashes 2017-05-08 23:27:44 -04:00
remove.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
sha2.c Use 32-bit wide integer type in PolarSSL code 2012-01-07 11:27:41 -06:00
sha2.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
signing.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
signing.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
sync.c do not rely on localdb for hook matching 2016-02-23 12:15:43 +10:00
sync.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
trans.c make alpm_unlock and trans_interrupt async safe 2016-02-23 12:41:36 +10:00
trans.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
util-common.c Split common utility functions for libalpm and pacman 2013-01-04 21:49:37 +10:00
util-common.h Split common utility functions for libalpm and pacman 2013-01-04 21:49:37 +10:00
util.c Avoid logical OR duplication warning from gcc-6 2017-05-08 23:27:40 -04:00
util.h Do not #define _RESERVED_IDENTIFIERS 2017-05-08 23:27:43 -04:00
version.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00