Mark Burgess <[EMAIL PROTECTED]> writes:
> Enrico, this works perfectly for me with the current svn version. I
> have not had time to check 2.2.3
ok, did another try and updated to recent 2.2.7 but problem still
persists.
It seems that server provides wrong information about the copied file;
e.g. when '/srv/cfengine-masterfiles/KEYS/radius/radiusd-ssl.key'
is a symlink to '../SSL.KEY/radius.bigo.ensc.de.key', then a
| /srv/cfengine-masterfiles/KEYS/radius/radiusd-ssl.key/radiusd-ssl.key
dest=/etc/pki/radius/key/radiusd-srv.key server=${policyhost}
| o=root g=radiusd m=0440
| linktype=copy action=warn
statement creates the following output with 'cfagent -dddd'
| GetCachedStatData(/srv/cfengine-masterfiles/KEYS/radius/radiusd-ssl.key)
| ...
| Protoreply: (OK: 1 511 511 0 0 1675 1214739102 1201363036 1201363036 1 2997 1
64772)
| Mode = 511,511
| OK: type=1
| mode=777
| lmode=777
| uid=0
| gid=0
| size=1675
| atime=1214739102
| mtime=1201363036 ino=2997 nlnk=1, dev=64772
| RecvSocketStream(8)
| (Concatenated 8 from stream)
| Transaction Receive [t 37][]
| RecvSocketStream(37)
| (Concatenated 37 from stream)
| Linkbuffer: OK:../SSL.KEY/radius.bigo.ensc.de.key
This means, that server says that requested file is a symlink with mode
0777 which points to a file with mode 0777. Latter is wrong.
Then, client continues to ImageCopy (image.c) and the
| if ((ip->force == 'y') || ok_to_copy || S_ISLNK(sourcestatbuf.st_mode)) /*
Always check links */
check always succeeds there (due to the S_ISLNK test).
cfservd 2.1.14 returns
| Protoreply: (OK: 0 420 511 0 0 1675 1214563915 1183282624 1211186176 0 6214 1
64770)
| Mode = 420,511
| OK: type=0
| mode=644
| lmode=777
for such files and recent clients (2.2.7) work correctly.
[http://article.gmane.org/gmane.comp.sysutils.cfengine.bugs/2203]
Enrico
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine