Setting dos_attr from smbc_setxattr problem 3.0.23a

derrell at derrell at
Wed Aug 16 16:40:18 GMT 2006

Henrik Zagerholm <henke at> writes:

> Hello list,
> I'm building a little tool to set m-time and c-time on a file on a  win box
> using libsmbclient.
> The m-time works as expected but when I try to do the same on c-time  it
> doesn't. (Actually the m-time gets modified when setting c-time ???).

The mechanism used for setting times differs depending on what Windows version
your peer is.  On "modern" versions of Windows, the SetPathInfo call is used,
whereas on older versions of Windows, setAttrE may be required.

The first thing that occurs when you issue these calls is that the current
values of the attributes are retrieved, using qpathinfo2 if available
("modern" versions of Windows); getatr otherwise.  In the latter case, only
m_time is retrieved, so c_time and a_time are set to the m_time value.

On what version of Windows are you trying to set c_time and m_time?


More information about the samba-technical mailing list