Donny9 opened a new pull request, #13573:
URL: https://github.com/apache/nuttx/pull/13573

   
   ## Summary
   fs/chmod/fchmod/lchmod: only set permissions by mode_t and ignore othjer bits
   ## Impact
   
   ## Testing
   test case:
   
   int main(void)
   {
     struct stat buf;
     int ret;
   
     stat("test1.t", &buf);
     printf("test1.t st.mode:%x\n", buf.st_mode);
     stat("test.t", &buf);
     printf("test.t st.mode:%x\n", buf.st_mode);
     ret = chmod("test1.t", buf.st_mode);
     if (ret == 0)
       {
         stat("test1.t", &buf);
         printf("test1.t st.mode:%x\n", buf.st_mode);
       }
   
     return 0;
   }
   
   >>
   test1.t st.mode:81b4
   test.t st.mode:81fd
   test1.t st.mode:81fd
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to