diff options
| author | John Wiegley | 2016-02-15 14:07:46 -0800 |
|---|---|---|
| committer | John Wiegley | 2016-02-15 14:07:46 -0800 |
| commit | 33bb679af9e323408c8089f0b5675a54776d60d5 (patch) | |
| tree | 597ee645c54d54e3d77bd3394a72d67b7293f262 /src | |
| parent | ab7583a2b00d13207ab1c325c25c520a33859eee (diff) | |
| parent | 10b8ed27ec91ff52f93eb0297dcc3abb214931aa (diff) | |
| download | emacs-33bb679af9e323408c8089f0b5675a54776d60d5.tar.gz emacs-33bb679af9e323408c8089f0b5675a54776d60d5.zip | |
Merge from origin/emacs-25
10b8ed2 Document EXIF image rotation
0f60049 Support integer image rotation and respect EXIF rotations
7dd45b6 Quote table names for postgres listings (sql-mode)
6bac035 * lisp/replace.el (replace-match-maybe-edit): Make arg
`backward' optional.
ee909aa * lisp/simple.el (next-line-or-history-element): Reset
temporary-goal-column.
0a289d3 Suppress ACL ops if configured with --disable-acl
1a9dbf5 Mention web bugs
fa55da2 Make mm-html-blocked-images default to "" again
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/fileio.c b/src/fileio.c index f185f38bd01..0372f46cd55 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -36,7 +36,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 36 | #include <selinux/context.h> | 36 | #include <selinux/context.h> |
| 37 | #endif | 37 | #endif |
| 38 | 38 | ||
| 39 | #ifdef HAVE_ACL_SET_FILE | 39 | #if USE_ACL && defined HAVE_ACL_SET_FILE |
| 40 | #include <sys/acl.h> | 40 | #include <sys/acl.h> |
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| @@ -2937,16 +2937,17 @@ Return nil if file does not exist or is not accessible, or if Emacs | |||
| 2937 | was unable to determine the ACL entries. */) | 2937 | was unable to determine the ACL entries. */) |
| 2938 | (Lisp_Object filename) | 2938 | (Lisp_Object filename) |
| 2939 | { | 2939 | { |
| 2940 | #if USE_ACL | ||
| 2940 | Lisp_Object absname; | 2941 | Lisp_Object absname; |
| 2941 | Lisp_Object handler; | 2942 | Lisp_Object handler; |
| 2942 | #ifdef HAVE_ACL_SET_FILE | 2943 | # ifdef HAVE_ACL_SET_FILE |
| 2943 | acl_t acl; | 2944 | acl_t acl; |
| 2944 | Lisp_Object acl_string; | 2945 | Lisp_Object acl_string; |
| 2945 | char *str; | 2946 | char *str; |
| 2946 | # ifndef HAVE_ACL_TYPE_EXTENDED | 2947 | # ifndef HAVE_ACL_TYPE_EXTENDED |
| 2947 | acl_type_t ACL_TYPE_EXTENDED = ACL_TYPE_ACCESS; | 2948 | acl_type_t ACL_TYPE_EXTENDED = ACL_TYPE_ACCESS; |
| 2949 | # endif | ||
| 2948 | # endif | 2950 | # endif |
| 2949 | #endif | ||
| 2950 | 2951 | ||
| 2951 | absname = expand_and_dir_to_file (filename, | 2952 | absname = expand_and_dir_to_file (filename, |
| 2952 | BVAR (current_buffer, directory)); | 2953 | BVAR (current_buffer, directory)); |
| @@ -2957,7 +2958,7 @@ was unable to determine the ACL entries. */) | |||
| 2957 | if (!NILP (handler)) | 2958 | if (!NILP (handler)) |
| 2958 | return call2 (handler, Qfile_acl, absname); | 2959 | return call2 (handler, Qfile_acl, absname); |
| 2959 | 2960 | ||
| 2960 | #ifdef HAVE_ACL_SET_FILE | 2961 | # ifdef HAVE_ACL_SET_FILE |
| 2961 | absname = ENCODE_FILE (absname); | 2962 | absname = ENCODE_FILE (absname); |
| 2962 | 2963 | ||
| 2963 | acl = acl_get_file (SSDATA (absname), ACL_TYPE_EXTENDED); | 2964 | acl = acl_get_file (SSDATA (absname), ACL_TYPE_EXTENDED); |
| @@ -2976,6 +2977,7 @@ was unable to determine the ACL entries. */) | |||
| 2976 | acl_free (acl); | 2977 | acl_free (acl); |
| 2977 | 2978 | ||
| 2978 | return acl_string; | 2979 | return acl_string; |
| 2980 | # endif | ||
| 2979 | #endif | 2981 | #endif |
| 2980 | 2982 | ||
| 2981 | return Qnil; | 2983 | return Qnil; |
| @@ -2993,13 +2995,14 @@ Setting ACL for local files requires Emacs to be built with ACL | |||
| 2993 | support. */) | 2995 | support. */) |
| 2994 | (Lisp_Object filename, Lisp_Object acl_string) | 2996 | (Lisp_Object filename, Lisp_Object acl_string) |
| 2995 | { | 2997 | { |
| 2998 | #if USE_ACL | ||
| 2996 | Lisp_Object absname; | 2999 | Lisp_Object absname; |
| 2997 | Lisp_Object handler; | 3000 | Lisp_Object handler; |
| 2998 | #ifdef HAVE_ACL_SET_FILE | 3001 | # ifdef HAVE_ACL_SET_FILE |
| 2999 | Lisp_Object encoded_absname; | 3002 | Lisp_Object encoded_absname; |
| 3000 | acl_t acl; | 3003 | acl_t acl; |
| 3001 | bool fail; | 3004 | bool fail; |
| 3002 | #endif | 3005 | # endif |
| 3003 | 3006 | ||
| 3004 | absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); | 3007 | absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); |
| 3005 | 3008 | ||
| @@ -3009,7 +3012,7 @@ support. */) | |||
| 3009 | if (!NILP (handler)) | 3012 | if (!NILP (handler)) |
| 3010 | return call3 (handler, Qset_file_acl, absname, acl_string); | 3013 | return call3 (handler, Qset_file_acl, absname, acl_string); |
| 3011 | 3014 | ||
| 3012 | #ifdef HAVE_ACL_SET_FILE | 3015 | # ifdef HAVE_ACL_SET_FILE |
| 3013 | if (STRINGP (acl_string)) | 3016 | if (STRINGP (acl_string)) |
| 3014 | { | 3017 | { |
| 3015 | acl = acl_from_text (SSDATA (acl_string)); | 3018 | acl = acl_from_text (SSDATA (acl_string)); |
| @@ -3030,6 +3033,7 @@ support. */) | |||
| 3030 | acl_free (acl); | 3033 | acl_free (acl); |
| 3031 | return fail ? Qnil : Qt; | 3034 | return fail ? Qnil : Qt; |
| 3032 | } | 3035 | } |
| 3036 | # endif | ||
| 3033 | #endif | 3037 | #endif |
| 3034 | 3038 | ||
| 3035 | return Qnil; | 3039 | return Qnil; |