shisa_principal_update(3)

πŸ“¦
version 1.0.3 Β· 2 versions
  • 1.0.3 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ shisa_principal_update β€” the glow-up edit for your principal data πŸ’…

okay bestie, welcome to shisa_principal_update(3), a page from the shishi manual, section 3 (that's the library-call section, iykyk). it's the API function that lets you edit the deets you've got stored about a principal. no cap.


🌸 NAME 🌸

shisa_principal_update β€” API function πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <shisa.h>

int shisa_principal_update(Shisa * dbh, const char * realm, const char *
principal, const Shisa_principal * ph);

like, she takes a handle, a realm, a principal, and a struct pointer, and she returns an int. that's the whole vibe. ⭐


πŸ’– ARGUMENTS πŸ’–

  • Shisa * dbh β€” the Shisa library handle you got from shisa(). your lil connection to the whole operation, fr fr. 🫢
  • const char * realm β€” the name of the realm the principal belongs to. where she lives, basically. 🏠
  • const char * principal β€” the name of the principal you want info about. that's your girl. πŸ‘‘
  • const Shisa_principal * ph β€” pointer to an existing principal structure holding the info you want to store in the database. this is the payload, bestie. πŸ“¦βœ¨

🌈 DESCRIPTION 🌈

so what she does is modify the information stored about the given principal, and we're talking PRINCIPAL@REALM here β€” that's the exact format, keep it. πŸ’œ

now here's the tea: it's usually a good idea to set only the fields that are to be updated in ph. like, don't dump your whole struct in there if you only changed one thing. that's just messy. πŸ™ˆ

the generally suggested move is:

  1. first call shisa_principal_find() to grab the current info πŸ“–
  2. then modify one field πŸ”§
  3. then call shisa_principal_update() ✨
and ngl, modifying several values at once is not recommended in general, because:
  1. it will overwrite any modifications made to other fields between the two calls β€” by other processes πŸ‘€ (yes, other processes are out here editing the same thing, the audacity)
  2. it will cause all values to be written again, which may generate more overhead. extra work for no reason, and we don't do that here πŸ’€

so like... one field at a time, bestie. slow and iconic. πŸ’πŸ’…


⭐ RETURN VALUE ⭐

  • SHISA_OK β€” slay, it worked πŸ’–
  • SHISA_NO_REALM β€” the indicated realm does not exist 😭
  • SHISA_NO_PRINCIPAL β€” the indicated principal does not exist 😭
  • an error code otherwise β€” the catch-all, the "something else went down" 🫠

πŸŽ€ REPORTING BUGS πŸŽ€

found a bug? don't suffer in silence, report it to <bug-shishi@gnu.org>. πŸ›βž‘οΈπŸ“§


Copyright Β© 2002-2022 Simon Josefsson.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.

(that's the whole license vibe β€” keep the notice, keep the notice, and you're golden ✨)


🌟 SEE ALSO 🌟

the full documentation for shishi is maintained as a Texinfo manual. if the info and shishi programs are properly installed at your site, the command

info shishi

should give you access to the complete manual. go read it, it's giving ✨ educated ✨ 🧚


and that's the page, bestie!! 🌈 this was shisa_principal_update(3) from shishi version 1.0.3 β€” go forth and update responsibly, one field at a time. mwah πŸ’‹πŸ’–πŸ¦‹