fscrypt_encrypt_symlink(9)
okay so bestie, this is the fscrypt_encrypt_symlink(9) page from the Kernel API Manual β¨ itβs giving kernel-API internals but make it cute π
no cap, this is the one for encrypting a symlink target when it needs it π¦
πΈ NAME πΈ
fscrypt_encrypt_symlink β encrypt the symlink target if needed π
β¨ SYNOPSIS β¨
int fscrypt_encrypt_symlink (struct inode *inode , const char *target ,
unsigned int len , struct fscrypt_str *disk_link );
π ARGUMENTS π
inodeβ symlink inode π±targetβ plaintext symlink target β¨lenβ length oftargetexcluding null terminator πdisk_linkβ (in/out) the on-disk symlink target being prepared π οΈ
π« DESCRIPTION π«
If the symlink target needs to be encrypted, then this function encrypts it into disk_link->name π₯. fscrypt_prepare_symlink must have been called previously to compute disk_link->len β οΈ. If the filesystem did not allocate a buffer for disk_link->name after calling fscrypt_prepare_link, then one will be kmalloc'ed and the filesystem will be responsible for freeing it π§Ήπ«Ά.
π₯ RETURN π₯
0 on success, -errno on failure ππ
π SEE ALSO π
- Kernel file
./include/linux/fscrypt.h fscrypt_needs_contents_encryption(9)fscrypt_is_nokey_name(9)fscrypt_has_encryption_key(9)fscrypt_prepare_link(9)fscrypt_prepare_rename(9)fscrypt_prepare_lookup(9)fscrypt_prepare_readdir(9)fscrypt_prepare_setattr(9)
Signed off with love from the Kernel API Manual corner: source ./include/linux, date October 2026, page fscrypt_encrypt_symlink(9) ππ¦β¨ periodt.
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms