~ubuntu-branches/ubuntu/maverick/curl/maverick

« back to all changes in this revision

Viewing changes to lib/file.c

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2009-12-11 19:33:21 UTC
  • mfrom: (3.4.2 squeeze) (40.1.2 curl)
  • Revision ID: james.westby@ubuntu.com-20091211193321-tenukopudyznzbjj
* Merge with Debian testing.  Remaining changes:
  - Keep build deps in main:
    - Drop build dependencies: stunnel, libdb4.6-dev, libssh2-1-dev
    - Add build-dependency on openssh-server
    - Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
19
 * KIND, either express or implied.
20
20
 *
21
 
 * $Id: file.c,v 1.120 2009-04-21 11:46:16 yangtse Exp $
 
21
 * $Id: file.c,v 1.121 2009-06-04 19:11:11 yangtse Exp $
22
22
 ***************************************************************************/
23
23
 
24
24
#include "setup.h"
95
95
#define DOS_FILESYSTEM 1
96
96
#endif
97
97
 
 
98
#ifdef OPEN_NEEDS_ARG3
 
99
#  define open_readonly(p,f) open((p),(f),(0))
 
100
#else
 
101
#  define open_readonly(p,f) open((p),(f))
 
102
#endif
 
103
 
98
104
/*
99
105
 * Forward declarations.
100
106
 */
251
257
    if(actual_path[i] == '/')
252
258
      actual_path[i] = '\\';
253
259
 
254
 
  fd = open(actual_path, O_RDONLY | O_BINARY);  /* no CR/LF translation! */
 
260
  fd = open_readonly(actual_path, O_RDONLY|O_BINARY); /* no CR/LF translation */
255
261
  file->path = actual_path;
256
262
#else
257
 
  fd = open(real_path, O_RDONLY);
 
263
  fd = open_readonly(real_path, O_RDONLY);
258
264
  file->path = real_path;
259
265
#endif
260
266
  file->freepath = real_path; /* free this when done */