"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "util/euca_file.c" between
eucalyptus-4.4.1.tar.gz and eucalyptus-4.4.2.tar.gz

About: Eucalyptus (Elastic Utility Computing Architecture for Linking Your Programs To Useful Systems) is an infrastructure for implementing "cloud computing" on clusters (compatible with Amazon’s EC2 interface, but designed to support multiple client-side interfaces).

euca_file.c  (eucalyptus-4.4.1):euca_file.c  (eucalyptus-4.4.2)
skipping to change at line 1126 skipping to change at line 1126
return (ret); return (ret);
} }
//! //!
//! ensure the temp file is only readable by the user //! ensure the temp file is only readable by the user
//! //!
//! @param[in] template //! @param[in] template
//! //!
//! @return -1 on failure or the corresponding files descriptor for the temp fil e //! @return -1 on failure or the corresponding files descriptor for the temp fil e
//! //!
char *safe_mkdtemp(char *template)
{
mode_t u = 0;
char *ret = NULL;
u = umask(0077);
ret = mkdtemp(template);
umask(u);
return (ret);
}
//!
//! ensure the temp file is only readable by the user
//!
//! @param[in] template
//!
//! @return -1 on failure or the corresponding files descriptor for the temp fil
e
//!
int safe_mkstemp(char *template) int safe_mkstemp(char *template)
{ {
mode_t u = 0;
int ret = 0; int ret = 0;
u = umask(0077);
ret = mkstemp(template); ret = mkstemp(template);
umask(u);
return (ret); return (ret);
} }
 End of changes. 4 change blocks. 
23 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)