[utils/ldapcertfs] Lien symbolique cert['info'] => xid=N
This commit is contained in:
parent
808a91a60b
commit
b88b72c49a
1 changed files with 11 additions and 0 deletions
|
@ -237,6 +237,17 @@ class LdapCertFS(fuse.Fuse):
|
||||||
xpath = '%s/xid=%s' % (mpath, cert["xid"][0])
|
xpath = '%s/xid=%s' % (mpath, cert["xid"][0])
|
||||||
if not xpath in self._storage:
|
if not xpath in self._storage:
|
||||||
self._storage[xpath]=Item(0755 | stat.S_IFDIR, self.uid, self.gid)
|
self._storage[xpath]=Item(0755 | stat.S_IFDIR, self.uid, self.gid)
|
||||||
|
# Si info on met un lien symbolique info => xid=id
|
||||||
|
if cert['info']:
|
||||||
|
item = Item(0644 | stat.S_IFLNK, self.uid, self.gid)
|
||||||
|
item.data = 'xid=%s' % cert["xid"][0]
|
||||||
|
spath = '%s/%s' % (mpath, cert['info'][0])
|
||||||
|
indice = 1
|
||||||
|
while spath in self._storage and self._storage[spath].data != item.data:
|
||||||
|
spath = '%s/%s (%s)' % (mpath, cert['info'][0], indice)
|
||||||
|
indice += 1
|
||||||
|
self._storage[spath] = item
|
||||||
|
self._add_to_parent_dir(spath)
|
||||||
self._add_to_parent_dir(xpath)
|
self._add_to_parent_dir(xpath)
|
||||||
self._add_to_parent_dir(mpath)
|
self._add_to_parent_dir(mpath)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue