Я просматриваю исходный код пакета PolicyKit в gnome, и я наткнулся на некоторый код в строке 568 ./src/polkitgnomeauthenticationdialog.c
, который мне нужно немного помочь с
if (g_strv_length (dialog->priv->users) > 1)
Это часть условного оператора, который определяет, какой диалог показывается пользователю, когда он просит его подтвердить свою подлинность, введя свой пароль.Мне нужна помощь, что означает dialog->priv-.users
.Я знаю, что это строка, оканчивающаяся NULL, так как это то, на чем работает g_strv_lngth
, и я понимаю, что это связано с привилегированными пользователями, но синтаксис меня немного отбрасывает, особенно ->
.Быстрое объяснение этой строки было бы очень ценно.
Для справки, полное условное утверждение:
label = gtk_label_new (NULL);
if (g_strv_length (dialog->priv->users) > 1)
{
gtk_label_set_markup (GTK_LABEL (label),
_("An application is attempting to perform an action that requires privileges. "
"Authentication as one of the users below is required to perform this action."));
}
else
{
if (strcmp (g_get_user_name (), dialog->priv->users[0]) == 0)
{
gtk_label_set_markup (GTK_LABEL (label),
_("An application is attempting to perform an action that requires privileges. "
"Authentication is required to perform this action."));
}
else
{
gtk_label_set_markup (GTK_LABEL (label),
_("An application is attempting to perform an action that requires privileges. "
"Authentication as the super user is required to perform this action."));
}
}