1106 * Verify that (fname) (in platform-independent notation), in relation |
1106 * Verify that (fname) (in platform-independent notation), in relation |
1107 * to (h) is secure. That means that each element of fname is checked |
1107 * to (h) is secure. That means that each element of fname is checked |
1108 * for symlinks (if they aren't permitted). Also, elements such as |
1108 * for symlinks (if they aren't permitted). Also, elements such as |
1109 * ".", "..", or ":" are flagged. |
1109 * ".", "..", or ":" are flagged. |
1110 * |
1110 * |
|
1111 * With some exceptions (like PHYSFS_mkdir(), which builds multiple subdirs |
|
1112 * at a time), you should always pass zero for "allowMissing" for efficiency. |
|
1113 * |
1111 * Returns non-zero if string is safe, zero if there's a security issue. |
1114 * Returns non-zero if string is safe, zero if there's a security issue. |
1112 * PHYSFS_getLastError() will specify what was wrong. |
1115 * PHYSFS_getLastError() will specify what was wrong. |
1113 */ |
1116 */ |
1114 int __PHYSFS_verifySecurity(DirHandle *h, const char *fname); |
1117 int __PHYSFS_verifySecurity(DirHandle *h, const char *fname, int allowMissing); |
1115 |
1118 |
1116 |
1119 |
1117 /* |
1120 /* |
1118 * Use this to build the list that your enumerate function should return. |
1121 * Use this to build the list that your enumerate function should return. |
1119 * See zip.c for an example of proper use. |
1122 * See zip.c for an example of proper use. |